2

With Ubuntu 17.04, I had created the following line in /etc/fstab to permanently mount a network drive. It worked perfectly.

//nas/shared/ /media/nas cifs username=(username),password=(pass),uid=1000,gid=1000,iocharset=utf8,sec=ntlm  0  0

However, the same code isn't working in Ubuntu 17.10 (clean installation, not an update). It shows the shared folder, but clicking on it throws an "operation permitted for root only" message.

Error Message 1

You should note that I have done the necessary chown -R on the /media/nas folder.

I even tried to access the share with a sudo nautilus, and I am getting this error.

Error Message 2

I have extensively read the MountWindowsSharesPermanently page on the Ubuntu wiki, but to no avail.

Any idea what I am doing wrong? Or could it be just a 17.10 bug?

  • Have you found the solution? – Suncatcher Mar 18 '18 at 11:55
1

I had the same symptoms and solved it by specifying using SMB1, for you that would be modifying it to be:

//nas/shared/ /media/nas cifs username=(username),password=(pass),uid=1000,gid=1000,iocharset=utf8,sec=ntlm,vers=1.0  0  0

If you want to be sure check your logs for cifs related messages.

  • Thank you so much, this worked, in conjunction with replacing //nas/shared with //nas.local/shared – Angelos Kyritsis Oct 20 '17 at 9:37
  • 1
    Be aware that Samba 1 has major security issues. zdnet.com/article/… Windows article, but you get the idea. – Organic Marble Oct 20 '17 at 14:08
  • While this does get rid of the error message, it's not a great solution. Does anyone know how we should be connecting to an SMB v2 (or v3) share without getting error messages? – Jonathan Hartley Dec 6 '17 at 3:07
0

I removed sec=ntlm from my fstab-mounted shares and that got rid of the errors.

This worked

//[server]/[share] /media/[mountpoint] cifs credentials=[credentialfile],iocharset=utf8,file_mode=0777,dir_mode=0777,uid=[me],gid=[me] 0 0

This didn't

 //[server]/[share] /media/[mountpoint] cifs credentials=[credentialfile],iocharset=utf8,sec=ntlm,file_mode=0777,dir_mode=0777,uid=[me],gid=[me] 0 0

It threw mount error(22): Invalid argument

It appears sec=ntlm has been invalidated.

  • Unfortunately this didn't work for me. Elgorath's solution worked, but it still needs the sec=ntlm, won't function without it. In any case, thank you for your input. – Angelos Kyritsis Oct 20 '17 at 9:43
  • I have a feeling the answer to this may depend on one's samba settings for the share. – Organic Marble Oct 20 '17 at 14:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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