How to force autofs cifs (samba) to use smb version >= 2.0

autofscifs

I'm using autofs mounting of a samba share from a Windows 10 (Creators edition).

Microsoft patched its OS to no longer accept smb version 1.0 sometimes in 2017.

SomeFolder -fstype=cifs,rw,username=johndoe,password=********,uid=root,file_mode=0777,dir_mode=0777,noperm,noserverino,iocharset=utf8,sec=ntlm://servername/SomeShare

See Mount CIFS Host is down for more information on the problem and solution.

After a while it finishes negociating (half an hour?) and then keeps working fine.

How do I do -o vers=2.0 with autofs?

Best Answer

The option vers is ignored in, at least, Debian 8 (jessie). We had issues mounting smbv2 shares, even with smbv1 disabled on the server side and -o vers=2.0 set. I tested it on a Debian 9 (stretch) box and it worked. But you have to use the vers option. Otherwise smbv1 is tried and you can't mount the share.

Related Question