ubuntusmbcifswindows-share

Ubuntu 17.10 mounting smb share keeps failing


I have searched the internet for about 2 hours now but all the suggested fixes do not work. Hopefully someone here knows a good way to fix this issue or can point me in the right direction.

The SMB server is a Synology NAS.

I used this method since Ubuntu 12, but now it will not work. I did the following

  1. install cifs
  2. edit the /etc/fstab and added the next line

    //servername/sharename /media/<username>/windowsshare cifs credentials=/home/ubuntuusername/.smbcredentials,iocharset=utf8,sec=ntlm 0 0 
    

The troubleshooting i already did

  1. Make sure the mount path exists and is empty (/media//windowsshare)
  2. Tried all the sec= options available
  3. set the rights on .smbcredentials file from 600 to 777
  4. Added servername to hosts file just in case
  5. Tried adding correct username= and password= instead of the file
  6. Tried using the command line instead of fstab

When connecting to the share using the same credentials in the File Explorer (Other Locations -> Connect to Server) it works without any problems.

P.S. This is a clean install of Ubuntu 17.10

The error sudo mount -a displays is:

mount error(95): Operation not supported Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)

If I need to supply any more information please let me know.

Thanks in advance. Chris


Solution

  • Ubuntu 17.10 might have changed the default SMB protocol version used. Man pages says default one is 1.0:

    man mount.cifs

    I've been able to successfully fix this issue explicitly specifying SMB protocol version 1.0 (vers=1.0) in /etc/fstab:

    //servername/sharename /media/<username>/windowsshare cifs credentials=/home/ubuntuusername/.smbcredentials,iocharset=utf8,sec=ntlm,vers=1.0 0 0