Mounting Samba / CIFS Shares from an NAS successfully in Linux

Please excuse this necessarily techy post – there’ll be something about the Church along in a minute…

I have  all my key data on a number of Network Attached Storage devices: hard disks which are directly wired to the network rather than another PC. This all gets backed up on the cloud and so (hopefully) data loss is kept to a minimum. They are available across the network (both wired and wifi) as CIFS (Common Internet Filing System) aka Samba shares.

On windows you simply link to these things by opening up the “My Computer” and selecting “Map Network Drive”

[caption id=”attachment_5231″ align=”aligncenter” width=”784″My PC You can see 5 mapped drives in Windows 8 from 3 different servers here.[/caption

On a linux machine, you can map each drive as you need them, but they tend to get lost each time you restart, so you need to add the correct configuration.

I use the Debian branch of linux (a mix of Debian, Ubuntu and Mint), so all my commands are prefixed with the sudo command. You could also do this as root.

cd /mnt
sudo mkdir X [the name of the mount you want to call this. I match the Windows drive letters
cd /etc
sudo nano fstab

Screen Capture (1)

I then add the following to this configuration table at the bottom

// /mnt/X cifs username=guest,password=,sec=ntlm 0 0


//<server ip>/<sharename> /<location of mount> cifs username=guest,password=,sec=ntlm 0 0

The key command appears to be the security option


(I’m assuming NT Lan Manager), it has taken ages to figure out that this is the key command. I have found that using the IP address of the server to be much more reliable than the Server name. NAS devices should have static IP addresses anyway.

I hope this is useful to someone.