7

On our Windows file servers SMBv1 was switched of recently due to security problems and a password policy introduced.

Since then we can't mount any more the shares from Ubuntu 16.04 using Gigolo. We get the German Error "Einhängen der Windows-Freigabe ist fehlgeschlagen: Die Wartezeit für die Verbindung ist abgelaufen" (timeout)

Now we were able to track down the problem to SMBv1 when mounting manually:

sudo mount -t cifs -o username=me //foo.local/digital /mnt

does not work, while

sudo mount -t cifs -o vers=2.0,username=me //foo.local/digital /mnt

does work.

So far so good - but we do not want to miss the comfort of mounting via Gigolo / Thunar.

How can Gigolo / Thunar (I think the both are based on GVFS) be told to use smbV2?

Alex
  • 970
  • 1
  • 16
  • 42

1 Answers1

10

Yes, but it comes at a price. Unlike mount.cifs gvfs and thunar use libsmbclient to access shares and it limits itself to the NT1 (SMB1) dialect.

But you can change that by editing /etc/samba/smb.conf and adding the following to the [global] section:

client max protocol = SMB3

There's another one at the minimum but it normally isn't required to do anything with that:

client min protocol = SMB2

The server and the client will auto-negotiate the best dialect to use between those two values.

The problem is this will disable host browsing so if you go to Network in your file browser it will be empty. Accessing it by name still works but must be done explicitly.

Mostafa Ahangarha
  • 4,358
  • 7
  • 35
  • 51
Morbius1
  • 7,261
  • 1
  • 15
  • 22
  • 1
    Thanks will try. Wondering what is the reason that it disables host browsing? – Alex Jun 17 '17 at 13:38
  • Sounds like an explanation for my problem. Do you have a source why Thunar/gvfs/libsmbclient is not able to browse shares without SMB1? "host browsing" refers to listing hosts in the network or shares on one host? See also related question: https://serverfault.com/q/970998/96200 – lumbric Jun 12 '19 at 08:01
  • 1
    It's more than Thunar. Explorer on Win10 cannot list NetBIOS host names either for the same reason - Win10 disables SMB1 on the client side in new builds. Ubuntu came up with a workaround: https://bugs.launchpad.net/ubuntu/+source/gvfs/+bug/1778322?comments=all but it has one tiny little problem: https://bugs.launchpad.net/gvfs/+bug/1828107 – Morbius1 Jun 13 '19 at 10:59