1

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. ;-)

George Udosen
  • 35,970
  • 13
  • 99
  • 121
Al_Pastor
  • 13
  • 1
  • 6

1 Answers1

2

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
Katu
  • 3,553
  • 25
  • 42
  • I have the # symbol in front of the command line on the fstab edit as I would like to make sure I have the syntax correct before I change it, so the [mount -a] wont help. – Al_Pastor Nov 12 '18 at 14:01
  • You can uncomment the line in the fstab and try `sudo mount -a`. Even if the line is wrong and you get an error it won't break the system because you don't need to reboot. Once you test the command in the fstab with mount, umount, you can reboot and it will happen as part of the boot process. – Katu Nov 12 '18 at 14:09
  • super, thanks. I tried the mount -a after editing the fstab uncomment and got the following error *mount error(22): Invalid argument* After looking that up I did *tail -f /var/log/kern.log* and got this *No dialect specified on mount. Default has changed to a more secure dialect, SMB2.1 or later (e.g. SMB3), from CIFS (SMB1). To use the less secure SMB1 dialect to access old servers which do not support SMB3 (or SMB2.1) specify vers=1.0 on mount.* – Al_Pastor Nov 12 '18 at 14:37
  • It's a known thing, you need to add vers=1.0, I have updated my answer. See https://askubuntu.com/questions/1032237/why-is-mount-cifs-not-working-in-fstab-any-more-after-upgrading-from-16-04-to-18 – Katu Nov 12 '18 at 15:40
  • works! Thank you, Katu. Sending Karma. now all I have to do is convince my wife that we need to rename the server. – Al_Pastor Nov 13 '18 at 08:13
  • @Al_Pastor If the answer solved your problem, you can mark it as a valid solution. If you find a solution for convincing wives, please share! – Katu Nov 13 '18 at 08:59