How to get my ubuntu shared folders appearing under network in windows 10

I have an alternative with respect to Windows 10 if anyone is interested. I submitted this as a bug / feature request in launchpad: https://bugs.launchpad.net/ubuntu/+source/samba/+bug/1831441

There exists in github something that has most of this already created. One can use it in Ubuntu but it requires some work to implement:

[1] Download the file:

wget https://github.com/christgau/wsdd/archive/master.zip

[2] UnZip it:

unzip master.zip

[3] Rename the python script

sudo mv wsdd-master/src/wsdd.py wsdd-master/src/wsdd

[4] Copy it to /usr/bin

sudo cp wsdd-master/src/wsdd /usr/bin

[5] A systemd service file is already provided in the package it just needs to be copied to the correct location:

sudo cp wsdd-master/etc/systemd/wsdd.service /etc/systemd/system

[6] The wsdd.service file has to be edited to remove references to the nobody user:

#User=nobody
#Group=nobody

[7] Then enable the service:

sudo systemctl daemon-reload
sudo systemctl start wsdd
sudo systemctl enable wsdd

Now Win10 can discover the Ubuntu server with its own native WSD protocol and there is no need to enable smb1 on the client side.


[1] It sounds like you already are using Samba. Please verify by running this command:

net usershare info --long

[2] Ubuntu 18.04 automatically "registers" your samba server to the rest of the network using mDNS ( Avahi ). All other Linux machines as well as macOS can "discover" this registration automatically.

[3] The reason Win10 cannot discover your server is becase although it can use mDNS it does not know how to scan the network for them automatically. Instead it uses NETBIOS and there are multiple problems with that:

[a] Win10 disables SMB1 on the client side ( as well as the server side ) and NETBIOS ( host name discovery not name resolution ) and SMB1 are linked - can't have one without the other. You can re-enable it by going to Control Panel > Programs and Features > Turn Windows features on or off > SMB 1.0/CIFS File Sharing Support > SMB 1.0/CIFS Client.

[b] But then you have to follow the NETBIOS rules - namely that your host name cannot be greater than 15 characters in length - among other things. Those kinds of things can be corrected in smb.conf. What you could do is edit /etc/samba/smb.conf and add these two line right below the workgroup = WORKGROUP line:

netbios name = ubserv1804
name resolve order = bcast host lmhosts wins

Then restart samba in this order:

sudo service smbd restart
sudo service nmbd restart

Then wait about 10 minutes or so - seriously. NETBIOS is so primitive that a restart of nmbd causes confusion in Windows and it takes a bit for it to act normal again.