2

I am new to Ubuntu and just only started using it. So please be specific if you are able to help me with my issue.

I am trying to automount my Netgear ReadyNAS shared drive which is using SMB1. I am aware of the security risk but there is nothing I can do as that is the only supported version.

Anyway, I am able to mount the shared drive using the following command:

sudo mount -t cifs -o username=MyUsername -o password=MyPassword -o vers=1.0 //192.168.0.34/Family_Medias /mnt/NAS-Media/

However, when I reboot the machine, the mounted folder is no longer mounted. My question is based on the above mount command, how do I add into /etc/fstab?

Please note that I had to add the option vers=1.0 or I will get the error "Host is down" due to the fact that my NAS device only supports SMB1. Thanks for any help you can provide me.

1
  • //192.168.0.34/Family_Medias /mnt/NAS-Media/ cifs credentials=/etc/samba/passwd_file,vers=1.0,sec=ntlm 0 0 (the sec= option may not be needed, I found I needed it on some boxes)
    – guiverc
    Dec 2, 2018 at 1:52

2 Answers 2

3

I use lines in fstab like this

//[my-ip-address]/[my-share] /media/[mount-point] cifs vers=3.0,credentials=[my-login-file],iocharset=utf8,file_mode=0777,dir_mode=0777,uid=[username],gid=[username],nofail 0 0

Once you've edited fstab (make a backup first!) don't reboot yet. Test your work by doing sudo mount -a and fix any errors before you reboot. This prevents breaking your system by an fstab error.

1
  • 1
    Thank you to both Organic Marble and guiverc for your answers. Its working fine and I was able to read/write to the CIFS shared folder. Dec 3, 2018 at 3:59
2
//192.168.0.34/Family_Medias /mnt/NAS-Media/    cifs credentials=/etc/samba/passwd_file,vers=1.0,sec=ntlm 0 0

can be added to your /etc/fstab file

You then create a /etc/samba/passwd_file or whatever you wish to call it with your credentials

username=secret1
password=secret2

the sec= option may not be needed, I found I needed it on some boxes

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.