# Ubuntu – Fstab edit for NAS mount

fstabmountnetworkingpermissionssamba

I have a WD Mycloud and I want to permanently mount the public folders on my Ubuntu computer. I have edited the fstab to this line but I have some questions:

//192.168.106.105/Public /media/nas cifs uid=1000,gid=1000,credentials=/home/pseudo/.nascredentials,iocharset=utf8,sec=ntlm 0 0


Q: can I test this from terminal before going live with the fstab command line? if so, what's the syntax?

Q: if the above line is incorrect, will it crash my ubuntu boot?

Q: the credentials; the public area on my LAN-NAS doesnt have a password/username requirement (I dont think) – is there a way to test this with a terminal command line? if so, do I just put username=guest password= (blank) in the credential file?

Any help greatly appreciated before I brick my system. 😉

• Q: can I test this from terminal before going live with the fstab command line? if so, what's the syntax?

You can mount all the drives listed in the fstab file with the command

sudo mount -a


Unmount all of the drives listed in fstab with

sudo umount -a


Q: if the above line is incorrect, will it crash my ubuntu boot?

Probably not, but just in case, add it at the end of fstab and have a live USB system ready in case you need to change the fstab file from it.

Q: the credentials; the public area on my LAN-NAS doesnt have a password/username requirement (I dont think) - is there a way to test this with a terminal command line? if so, do I just put username=guest password= (blank) in the credential file?

I think you should be able to remove the credentials part of the line completely. Otherwise, try creating a credentials file with empty user and password. If you try without the credentials and you get "permission error", your LAN-NAS does have password/username requirement.

If you are using Ubuntu 18.04 you might have to add vers=1.0 to your line, depending on the version running in your server. So your line would be:

//192.168.106.105/Public /media/nas cifs vers=1.0,uid=1000,gid=1000,credentials=/home/pseudo/.nascredentials,iocharset=utf8,sec=ntlm 0 0