How To: Mount a NAS in Linux (via CIFS)
r3dux | July 3, 2009Apparently CIFS is the new Samba, so to mount your NAS via CIFS instead of Samba, read this, then change the fstab line to:
//<YOUR-NAS-IP>/<NAME-OF-NAS-SHARE> /<WHERE-YOU-WANT-TO-MOUNT-THE-NAS> cifs credentials=/root/.credentials,rw,auto,uid=<YOUR-UID-NUMBER-OR-USER-ACCOUNT-NAME>,gid=<YOUR-GID-NUMBER-OR-GROUP-NAME> 0 0
i.e. For me it’s:
//192.168.1.100/Share /mnt/Share cifs credentials=/root/.credentials,rw,auto,uid=r3dux,gid=r3dux 0 0
You might notice reference to a .credentials file above. You need to create this!!
The format of the credentials file [you can call it anything & place it anywhere - just make sure you point to it in the fstab lines(s)] is:
username=YOUR-NAS-USER-NAME password=YOUR-NAS-PASWORD
So stick the above two lines in a file, substituting appropriately for the accounts and passwords on your NAS, then sudo chmod 600 it and remount the filesystem with sudo mount -a.
Job’s a good ‘un!
Update: Don’t forget – you’ll need to have samba, smbfs and cifs-utils installed for this to work! So go nuts with:
sudo apt-get install samba smbfs cifs-utils









