For some time now I knew that there was something wrong with LibreELEC (and OpenELEC) samba, but only now I decided to look at it in detail and try to find the real reason...
The issue is that if we just connect a LibreELEC device (with default config) on a LAN with Windows machines (in my case W7 and XP pc's) as soon as the LibreELEC device is elected the smb master browser (and this is easy after short time, with the current samba config on it...) then problems start, Windows machines can no longer browse Workgroup and properly see other smb devices/pc's on the LAN.
(though note that some may be cached for some time on "Network" folder on W7 at least... and it may seem tricky... but 'net view' shows them with no cache apparently, then easy to test)
Example, you can see LibreELEC is master browser and 'net view' can't show devices list:
- C:\Documents and Settings\NARS>net view
- System error 53 has occurred.
- The network path was not found.
- C:\Documents and Settings\NARS>nbtstat -a LibreELEC
- Local Area Connection:
- Node IpAddress: [192.168.1.2] Scope Id:
- NetBIOS Remote Machine Name Table
- Name Type Status
- LIBREELEC <00> UNIQUE Registered
- LIBREELEC <03> UNIQUE Registered
- LIBREELEC <20> UNIQUE Registered
- ..__MSBROWSE__.<01> GROUP Registered
- WORKGROUP <1D> UNIQUE Registered
- WORKGROUP <1E> GROUP Registered
- WORKGROUP <00> GROUP Registered
I used to just edit OE samba config and set 'local master = no' to prevent it becoming local master (and I could find a few other posts on OE forum about doing same), thus avoiding the problem, however now that I did a clean LibreELEC install I decided to do further research and some tests about this... and... I'm very confident that the reason for this is that stock LibreELEC samba config defines 'smb ports = 445' instead of the samba default 'smb ports = 445 139'... i.e. disabling port 139 means no NetBIOS is available (force using Direct-hosted smb only), however then it just doesn't work as NetBIOS browser service and thus it cannot be the master browser or it breaks browsing Workgroup devices on the whole LAN.
My suggestion to fix the problem (and yes, I did fully test it before posting this) is either replace 'smb ports = 445' to 'smb ports = 445 139' (or just omit that 'smb ports' line completely, as this is the samba default anyway...) OR if you really want to keep NetBIOS disabled for some reason (I don't see what one honestly, as both are supposed to be always available and devices should auto-negociate and use Direct-hosted vs NetBIOS automatically) then just set 'local master = no' to prevent LibreELEC device to participate on elections for master browser.