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

9,747

Solution 1

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.

Solution 2

For example, you can use something like this:

-fstype=cifs,file_mode=0770,dir_mode=0770,nounix,uid=1000,gid=1000,vers=2.0
Share:
9,747

Related videos on Youtube

Tiberiu-Ionuț Stan
Author by

Tiberiu-Ionuț Stan

Updated on September 18, 2022

Comments

  • Tiberiu-Ionuț Stan
    Tiberiu-Ionuț Stan almost 2 years

    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?

  • Seth
    Seth about 7 years
    Could you expand the answer a bit to explain what it does and why the difference between this and the original is important?
  • Tiberiu-Ionuț Stan
    Tiberiu-Ionuț Stan about 7 years
    I think vers=2.0 is being ignored. Actually, disabling SMB 1.0 in the Windows registry resulted in inability to connect at all. I'll do some more tests soon.
  • foraidt
    foraidt almost 7 years
    worked for me (with vers=3.0) on raspbian Jessie with automount 5.0.8