Saturday 12 June 2010

Mounting CIFS Directories in Linux

As Root, create /root/smbcredentials, with the lines:
username=...username..
password=..password..
and set the permissions: chmod 700 /root/smbcredentials

Edit /etc/fstab, and append the line:
//netbiosname/sharename /media/sharename cifs credentials=/root/smbcredentials,iocharset=utf8,file_mode=0775,dir_mode=0775 0 0
Mount the new drive with: mount -a