1st part: The user that will connect, should have a Samba password on the Ubuntu machine:
You can a smb password for a user defined on your machine with the command
sudo smbpasswd -a <username>
Replacing <username>
with the name of the user that will be connecting to a SMB share on your Ubuntu machine. This user must be aleardy existing user on your machine.
2nd Part
It helps to browse the SMB shares if the computers are willing to act as masters for the SMB protocol. In the [Global] section of the file /etc/samba/smb.conf
add the lines
local master = yes
preferred master = yes
3rd part
Windows now uses WSD (web services discovery?) which is not included in the various Samba's that are available as of Ubuntu 19.04.
There is a project at github which implements WSD, written in Python. It can be found at https://github.com/christgau/wsdd or directly downloaded at https://raw.githubusercontent.com/christgau/wsdd/master/src/wsdd.py
Part of the trick to using this is that you will need to enable a couple of ports through your firewall:
Ports 5357/tcp and 3702/udp need to be open for wsdd to run.
wsdd can be run from the command line, or you could create a systemd service to run it.
This is an active (maybe) area of Samba development, and some information about it can be found at https://www.ixsystems.com/community/resources/how-to-kill-off-smb1-netbios-wins-and-still-have-windows-network-neighbourhood-better-than-ever.106/ and is currently available in the Arch user repository, and apparently a few other distros as well. It is also mentioned in AskUbuntu at
make samba share visible in Windows "Network"
Starting as a service
I created a systemd service unit file for wsdd as /lib/systemd/system/wsdd.service
contents are
[Unit]
Description=WSDD Network Service
BindsTo=smbd.service
After=smbd.service
[Service]
Type=simple
RemainAfterExit=yes
ExecStart=/usr/bin/wsdd
#ExecReload=/user/bin/wsdd
[Install]
WantedBy=multi-user.target
Then I moved wsdd.py
to /usr/bin/wsdd
, and modified its permissions to 555 (read and execute).
Finally, sudo systemctl enable wsdd.service
and a reboot - and my Ubuntu system is now visible to my Win10 computers.
Best Answer
So i have figured this on my own and this is the easiest solution:
just install samba with
and go to this file:
and just at the bottom add these lines:
restart the samba service
and that's it, easy peasy :)