I've seen several solutions involving setting combinations of min and max client and server protocols, but I can't get the browsing from Thunar to work no matter what.
Trying to browse with smbclient...
smbclient -L <server_ip>
...fails with:
protocol negotiation failed: NT_STATUS_INVALID_PARAMETER_MIX
I find nothing on NT STATUS, except nt status support which doesn't quite tell me anything.
I realize however, that smbclient
defaults to the highest possible protocol (SMB3_11 by the looks of it), and I figure if I do this in smb.conf...
client min protocol = SMB3
client max protocol = SMB3
server min protocol = SMB3
server max protocol = SMB3
... then the protocol should be locked down pretty good.
But still I get the same error from smbclient.
So I try...
smbclient -L <server_ip> --debuglevel 2
...and it tells me I have permission denied on a file:
rlimit_max: increasing rlimit_max (1024) to minimum Windows limit (16384)
added interface wlp16s0 ip=<client_ip> bcast=<subnet broadcast> netmask=<subnet mask>
tdb(/var/cache/samba/gencache.tdb): tdb_open_ex: could not open file /var/cache/samba/gencache.tdb: Permission denied
tdb(/var/cache/samba/gencache.tdb): tdb_open_ex: could not open file /var/cache/samba/gencache.tdb: Permission denied
tdb(/var/cache/samba/gencache.tdb): tdb_open_ex: could not open file /var/cache/samba/gencache.tdb: Permission denied
protocol negotiation failed: NT_STATUS_INVALID_PARAMETER_MIX
Now, that file is readable, so I don't know what this is all about.
$ ls -la /var/cache/samba/gencache.tdb
-rw-r--r-- 1 root root 1,3M 11.04.2020 13:06 /var/cache/samba/gencache.tdb
What I do know, however is that...
smbclient -m SMB3 -L <server_ip>
...gives me a nice list of shares from the Samba server - even though -m SMB3
does nothing more than specify what is already the default.
And incidentally, with --debuglevel 2
I still get a permission error on that file, so it probably hasn't got anything to do with it (it's not recreated either if I delete it, though the error remains).
I think a fair conclusion from this is that something doesn't quite work with the protocol negotiation - and because some applications can browse, such as smbclient, but not others, such as Thunar, it must be related to how the applications do that negotiation.
I think Thunar (and gvfs) uses libsmbclient to browse Samba shares and, without reference, I think that library can't browse protocols higher than NT1, except I can't get that to work anymore.
There's an old bug report that gvfs can't browse shares that has disablet SMB1, although I know I used it with NT1.
So, uh.. all that didn't really get me anywhere (Thunar still complains about not being able to retrieve a share list from the server).
But maybe somebody more knowledgeable than me can get something more out of all this?