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

6

3 Answers

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.

5

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
1

I am using pam_mount to automatically mount drives on login. When I updated to Xubuntu 16.04.3 the login process would no longer complete. It just hung. I tested manually mounting CIFS shares and saw that it never exited from the mount command.

I had to add a vers=1.0 to the mount options to mount cifs shares from my SuSE CIFS shares. Once I did that everything worked fine.

Your Answer

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

Sarah Jenkins

Sarah Jenkins

Senior Technology Editor & AI Specialist

Sarah Jenkins is a veteran tech journalist with over 12 years of experience covering artificial intelligence, mobile innovations, and digital ethics. Her insights have appeared in leading technology publications worldwide.

Share this article
Twitter Facebook Pinterest