smb1 and network discovery
m.novosyolov at rosalinux.ru
Sun Oct 27 10:03:00 UTC 2019
smb1 still has some very important use cases in Samba, for which there
is no replacement.
I would like to remember about network discovery.
smb protocols > NT1 do not allow to list smb:// network, only smb1/nt1
can be used to list it.
Only smb1 allows to browse smb:// network: find shares, computers and
It has been broken since samba 4.8 or 4.9, when samba stopped trying to
connect using smb1 by default and started to use smb2 as a first option
to try to connect.
Nowadays the only possible way to work with smb1 and to find computers
in the newtwork is setting 'client max protocol = NT1' is smb.conf, but
this breaks smb2, smb3 etc.
Modern Windows uses Web Service Discovery protocol to do this.
There is wsdd - a simple Python daemon which allows a UNIX host to be
discoverable via WSS: https://github.com/christgau/wsdd/
I am surprised why my package of wsdd in ROSA Linux
(https://abf.io/import/wsdd) and the one in AUR are the only ones across
all *nix systems: https://repology.org/project/wsdd/versions
Seems that really few people are interested in solving this problem.
wsdd makes Linux hosts discoverable from Windows and will be
preinstalled in future realeases of ROSA Linux.
But wsdd only makes Linux discoverable by Windows, Windows hosts, shares
and printers still cannot be discovered by from Linux! I saw a link to
https://bugzilla.samba.org/show_bug.cgi?id=11473 where there are patches
to implement WSS in Samba, but there is no progress there.
Network discovery via smb1 is widely used in a typical GNU/Linux desktop:
- GVFS, browsing network in file managers (Nautilus, Thunar,
pcmanfm(-qt) and others)
GVFS recently made a workaround to browse smb:// with newer versions
It uses "smbc_setOptionProtocols (smb_context, "NT1", "NT1");" from
It sets client max protocol = NT1 to list root of smb://, but then
smb1 may be not used for deeper listing of a specific file share.
- KDE KIO, browsing network in Dolphin file manager
I wanted to make a similar workaround of broken smb:// listing, but
did not finish it because it requires chnaging a lot in KIO SMB
- system-config-printer (GTK+ GUI to setup printers) can find smb-shared
printers, but fails to do so with newest samba versions due to
impossibility to list smb:// without forcing smb1 protocol
Now it is possible to workaround listing smb:// as GVFS does by forcing
NT1 protocol, but removal of smb1 from samba will break even this!
In most cases security is not so important, for example, if it is a
small office, where even authorization is not used to connect to shares
So, what I would like to pay attention to: network discovery via smb is
broken in samba but can still be used with workarounds, removing smb1
will make it completely impossible.
More information about the samba-technical