CIFS mount in FSTAB does not work after update

A few hours ago i made a full update via the software-center. The mounted shares allready worked fine, but after updating i just get this error message:

mount error(22): Invalid argument Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)

This is how my shares are mounted in fstab:

//IP-of-server/samba-directory  /Path-to-mount-point/ cifs users,noauto,uid=1000,gid=1000,credentials=/path-to-credentials,iocharset=utf8,sec=ntlm   0       0

using

mount -a

does not show any errors. Trying to access the share with the File-Explorer directly (using smb://path-to-server) works fine as well. I have allready tried to use the "vers" option, but with no success.

using

tail -f /var/log/kern.log

returns

CIFS VFS: Unable to select appropriate authentication method!

Thank you for your help and replying


I actually do not know why, but after update the sec=ntlm option for cifs in fstab does not work anymore and forced me to use the option vers=1.0. After removing sec=ntlm it works again. I think the new version of cifs uses a more secure dialect.


I just had the same issue with this line in fstab and after upgrading Ubuntu

//10.0.0.10/D$ /mnt/toruk/d  cifs credentials=/etc/winpassword.txt,iocharset=utf8,sec=ntlm,ro 0 0

Which got me the same error message on the command line:

# mount /mnt/toruk/d
mount error(22): Invalid argument
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)

and in /var/log/syslog

Sep 14 22:48:13 truhe kernel: [67664.396524] CIFS VFS: Unable to select appropriate authentication method!
Sep 14 22:48:13 truhe kernel: [67664.396529] CIFS VFS: Send error in SessSetup = -22
Sep 14 22:48:13 truhe kernel: [67664.396658] CIFS VFS: cifs_mount failed w/return code = -22

Adding the parameter vers=1.0 did make it work again, however the default was changed for a reason, and there had to be something better than fall back to the insecure deprecated protocol.

Thanks to this answer and comments I could get it to work again by not using vers, but changing sec=ntlmssp

//10.0.0.10/D$ /mnt/toruk/d  cifs credentials=/etc/winpassword.txt,iocharset=utf8,sec=ntlmssp,ro 0 0