Ubuntu machine visible in Windows file explorer

How to See Ubuntu Machines and Samba Shares on a Windows 10 Network

Last updated on

In this guide we will install a WDS service on Ubuntu, which will allow Windows 10 machines to see other Ubuntu machines and Samba shares in Windows File Explorer.

Prerequisites

This guide is for Windows 10 users who cannot see other Ubuntu machines in the Windows File Explorer, but can access them directly with the network path either by using the hostname (\\hostname\share) or IP (\\192.168.1.10\share).

You will need sudo privileges on the Ubuntu machine to install the wsdd service.

You should also make sure Samba is already installed and running on Ubuntu. You can find out by checking the service with:

sudo systemctl status smbd

If not installed, install with:

sudo apt update && sudo apt install samba

The Problem with Ubuntu 18.04/20.04 and Windows 10 Network Discovery

SMB 1.0 (SMBv1)

Several guides and YouTube videos I’ve researched suggest manually enabling SMB 1.0 in Windows 10 in order to make other Ubuntu machines visible in Windows File Explorer. While this may work on older editions of Windows 10, it is not advised due to the security implications.

From Microsoft:

“Hi folks, Ned here again and today’s topic is short and sweet: Stop using SMB1. Stop using SMB1 . STOP USING SMB1!” source

With Windows 10 version 1511, support for SMBv1 and thus NetBIOS device discovery was disabled by default. Depending on the actual edition, later versions of Windows starting from version 1709 (“Fall Creators Update”) do not allow the installation of the SMBv1 client anymore.

This causes hosts running Samba not to be listed in the Explorer’s “Network (Neighborhood)” views. While there is no connectivity problem and Samba will still run fine, users might want to have their Samba hosts to be listed by Windows automatically.

mDNS

Ubuntu 18.04/20.04 automatically register 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.

The reason Windows 10 cannot discover Ubuntu network shares is because although it can use mDNS it does not know how to scan the network for them automatically.

WDS

Web Services for Devices (WSD) is a Microsoft API to enable programming connections to web service enabled devices, such as printers, scanners and file shares. It serves as a replacement for older Windows networking functions such as NetBIOS.

With the addition of a WSD service in Ubuntu, Windows 10 will discover the Linux Samba server using its native WSD protocol.

Why Doesn’t Ubuntu Support WDS Natively?

This issue has been raised in the Samba bug tracker since 2015. So it may happen that this feature gets integrated into Samba at some time in the future. But for now, we have to manually install a patch ourselves.

Installing WDS on Ubuntu

wsdd is a service by christgau on GitHub, which implements a Web Service Discovery host daemon for Ubuntu. This enables Samba hosts to be found by Web Service Discovery Clients like Windows 10.

If you are experiencing any issues with this service, please let us know in the comments or submit an issue on GitHub.

Change to /tmp directory.

cd /tmp

Download and unzip the archive.

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

Rename wsdd.py to wsdd.

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

Copy to /usr/bin.

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

Copy wsdd to /etc/systemd/system.

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

Open wsdd.service in nano and comment out User=nobody and Group=nobody with a ; semicolon.

sudo nano /etc/systemd/system/wsdd.service
/etc/systemd/system/wsdd.service
[Unit]
Description=Web Services Dynamic Discovery host daemon
; Start after the network has been configured
After=network-online.target
Wants=network-online.target
; It makes sense to have Samba running when wsdd starts, but is not required
;Wants=smb.service

[Service]
Type=simple
ExecStart=/usr/bin/wsdd --shortlog
; Replace those with an unprivledged user/group that matches your environment,
; like nobody/nogroup or daemon:daemon or a dedicated user for wsdd
; User=nobody 
; Group=nobody
; The following lines can be used for a chroot execution of wsdd.
; Also append '--chroot /run/wsdd/chroot' to ExecStart to enable chrooting
;AmbientCapabilities=CAP_SYS_CHROOT
;ExecStartPre=/usr/bin/install -d -o nobody -g nobody -m 0700 /run/wsdd/chroot
;ExecStopPost=rmdir /run/wsdd/chroot

[Install]
WantedBy=multi-user.target

Save and exit (press CTRL + X, press Y and then press ENTER)

Reload daemon.

sudo systemctl daemon-reload

Start and enable wsdd.

sudo systemctl start wsdd
sudo systemctl enable wsdd

Output:

Created symlink /etc/systemd/system/multi-user.target.wants/wsdd.service → /etc/systemd/system/wsdd.service.

Now check that the service is running.

sudo service wsdd status

Output:

 wsdd.service - Web Services Dynamic Discovery host daemon
     Loaded: loaded (/etc/systemd/system/wsdd.service; enabled; vendor preset: enabled)
     Active: active (running) since Wed 2020-06-10 10:51:39 CEST; 8s ago
   Main PID: 40670 (python3)
      Tasks: 1 (limit: 6662)
     Memory: 10.8M
     CGroup: /system.slice/wsdd.service
             └─40670 python3 /usr/bin/wsdd --shortlog

jun 10 10:51:39 ubuntu systemd[1]: Started Web Services Dynamic Discovery host daemon.
jun 10 10:51:40 ubuntu wsdd[40670]: WARNING: no interface given, using all interfaces

You should now be able to browse your Ubuntu machines and Samba shares in the Windows 10 file explorer. You may need to restart the Windows 10 machines to force discovery.

You may also want to reboot the Ubuntu server just to make sure the wsdd service starts up automatically without issue.

How to Uninstall wsdd

If you want to completely uninstall wsdd, stop and disable the service.

sudo systemctl stop wsdd
sudo systemctl disable wsdd

Remove wsdd from /usr/bin.

sudo rm /usr/bin/wsdd

Remove service file.

sudo rm /etc/systemd/system/wsdd.service

feat-discovery Branch

These were the old instructions using the feat-discovery branch before certain issues were resolved in the master branch. However, I am keeping them here just in case anyone has issues with the master branch.

Change to /tmp directory.

cd /tmp

Download and unzip the archive.

wget https://github.com/christgau/wsdd/archive/feat/discovery.zip
unzip discovery.zip

Rename wsdd.py to wsdd.

sudo mv wsdd-feat-discovery/src/wsdd.py wsdd-feat-discovery/src/wsdd

Copy to /usr/bin.

sudo cp wsdd-feat-discovery/src/wsdd /usr/bin

Copy wsdd to /etc/systemd/system.

sudo cp wsdd-feat-discovery/etc/systemd/wsdd.service /etc/systemd/system

Open wsdd.service in nano and comment out User=nobody and Group=nobody with a ; semicolon.

sudo nano /etc/systemd/system/wsdd.service
/etc/systemd/system/wsdd.service
[Unit]
Description=Web Services Dynamic Discovery host daemon
; Start after the network has been configured
After=network-online.target
Wants=network-online.target
; It makes sense to have Samba running when wsdd starts, but is not required
;Wants=smb.service

[Service]
Type=simple
ExecStart=/usr/bin/wsdd --shortlog
; Replace those with an unprivledged user/group that matches your environment,
; like nobody/nogroup or daemon:daemon or a dedicated user for wsdd
; User=nobody 
; Group=nobody
; The following lines can be used for a chroot execution of wsdd.
; Also append '--chroot /run/wsdd/chroot' to ExecStart to enable chrooting
;AmbientCapabilities=CAP_SYS_CHROOT
;ExecStartPre=/usr/bin/install -d -o nobody -g nobody -m 0700 /run/wsdd/chroot
;ExecStopPost=rmdir /run/wsdd/chroot

[Install]
WantedBy=multi-user.target

Save and exit (press CTRL + X, press Y and then press ENTER)

Reload daemon.

sudo systemctl daemon-reload

Start and enable wsdd.

sudo systemctl start wsdd
sudo systemctl enable wsdd

Output:

Created symlink /etc/systemd/system/multi-user.target.wants/wsdd.service → /etc/systemd/system/wsdd.service.

Now check that the service is running.

sudo service wsdd status
1 Star2 Stars3 Stars4 Stars5 Stars 4.50 (2 votes)

Let me know if this helped. Follow me on Twitter, Facebook and YouTube, or 🍊 buy me a smoothie.

p.s. I increased my AdSense revenue by 68% using AI 🤖. Read my Ezoic review to find out how.

29 replies

avatar
  Subscribe  
newest oldest
Notify of
Max
Guest
Max
Max
4 days ago

Worked perfectly. Now just have to figure out how to connect as a different user

Arlindo
Guest
Arlindo
Arlindo
8 days ago

Well Done. Thanks a lot. You did my day! My Xubuntu changed interface name(Ill try later discover why). My ip was changed, also interface name and I couldnt reconnect my win10 to samba server on Xubuntu 18.04. I found this wsdd package and suppose, may be later, will be included on next version of Ubuntu.

Marshall Simmons
Guest
Marshall Simmons
Marshall Simmons
10 days ago

Thank You SO Much!

Javier Piedragil
Guest
Javier Piedragil
Javier Piedragil
28 days ago

I followed the instructions without success.
All services are available and running (samba & wsdd), in Windows Explorer I can see the Ubuntu machine but I get an error when I try to open it. Windows displays a “Windows cannot access \MYSERVER. I run the diagnostics but all I get is this message: “Troubleshooting couldn’t identify the problem”.
I’m running Windows 10 Version 2004 (19041.329) and Ubuntu Desktop 20.04.
Any help will be appreciated.

Pat
Guest
Pat
Pat
1 month ago

regarding the Ubuntu 20.04 related issue, I opened an issue on Github and the answer is: use v0.6
I replaced the /usr/bin/wsdd file with the v0.6 wsdd.py and everything is OK now. Most warnings have also vanished.
It would be great if you could update your post here, because your detailed step by step instructions are very helpful for people like me.
I would not have even tried without your guide.
Thanks again!

Pat
Guest
Pat
Pat
1 month ago

Same as Boandlgramer 🙁
Didn’t work for me. No discovery and the service puts a 100% load on one core permanently. No special warning, looked like it’s working but it didn’t.
Ubuntu 20.04 – fresh install.

angel
Guest
angel
angel
1 month ago

Same problem as described by others. The process uses one core at 100% all the time.

bwat47
Guest
bwat47
bwat47
1 month ago

very clear steps, thanks!

Kevin
Guest
Kevin
Kevin
1 month ago

That has to be the fastest I’ve ever seen windows network neighborhood respond.
Thanks.

1eqdqd
Guest
1eqdqd
1eqdqd
1 month ago

Best solution that I have seen. Works great. Now I can see the ubuntu servers.

Boandlgramer
Guest
Boandlgramer
Boandlgramer
1 month ago

Sorry – didn’t work for me. No discovery and the service puts a 100% load on one core permanently. No special warning, looked like it’s working but it didn’t.
Ran it on ubuntu server 20.04 – nearly clean install.

Satish
Guest
Satish
Satish
1 month ago

Best solution that I have seen. Works great. Now I can see the ubuntu servers.

Rich
Guest
Rich
Rich
2 months ago

Installed this morning following guide above with the “feat-discovery” changes. Everything worked as advertised except the status numbers were different and I had an extra line of warnings. I was using ssh on Windows Powershell to install and after the sucessful installation I jumped to my Windows File Explorer and opened then after a few seconds the Network section showed all of my Windows machines and the Linux server. I clicked on the server and it then showed my Linux shares which I opened a previous saved text document and watched a clip of a video from the server on the Windows machine.

Next I used Powershell to reboot the Linux server and closed the File Expolrer window. Linux server has a fast bootup and after waiting a minute I opened a new File Explorer window and again after a few seconds all Windows machines and Linux server appeared in the Network section.

Wonderful and thank you. I have a 3 drive ZFS pool on the Linux server. To get the shares setup using the ZFS wrapper, Samba configuration, and Windows Discovery has taken me quite a while in which weeks were spent using Duck Duck Go and Google to almost finally end this journey. Hopefully the Samba gurus will get their socks on and implement this discovery process soon. Kind of silly for the “Next Operating System” to be behind M$ Windows instead of leading.

Thanks again,
Rich

Rich
Guest
Rich
Rich
2 months ago

Any update about the boot issue?

ramesh
Guest
ramesh
ramesh
2 months ago

It’s works until reboot, then the wsdd service fails to start. I have to start it manually myself. Any ideas?

● wsdd.service - Web Services Dynamic Discovery host daemon
     Loaded: loaded (/etc/systemd/system/wsdd.service; enabled; vendor preset: enabled)
     Active: failed (Result: exit-code) since Sun 2020-05-03 12:48:08 CEST; 35min ago
    Process: 1398 ExecStart=/usr/bin/wsdd --shortlog (code=exited, status=1/FAILURE)
   Main PID: 1398 (code=exited, status=1/FAILURE)

may 03 12:48:08 ubuntu wsdd[1398]:     self.server_bind()
may 03 12:48:08 ubuntu wsdd[1398]:   File "/usr/bin/wsdd", line 64, in server_bind
may 03 12:48:08 ubuntu wsdd[1398]:     super().server_bind()
may 03 12:48:08 ubuntu wsdd[1398]:   File "/usr/lib/python3.8/http/server.py", line 138, in server_bind
may 03 12:48:08 ubuntu wsdd[1398]:     socketserver.TCPServer.server_bind(self)
may 03 12:48:08 ubuntu wsdd[1398]:   File "/usr/lib/python3.8/socketserver.py", line 466, in server_bind
may 03 12:48:08 ubuntu wsdd[1398]:     self.socket.bind(self.server_address)
may 03 12:48:08 ubuntu wsdd[1398]: OSError: [Errno 99] Cannot assign requested address
may 03 12:48:08 ubuntu systemd[1]: wsdd.service: Main process exited, code=exited, status=1/FAILURE
may 03 12:48:08 ubuntu systemd[1]: wsdd.service: Failed with result 'exit-code'.
don
Guest
don
don
2 months ago

Thank you so much this had been driving me crazy !! i had even tried smb1 and it still wasnt working but i followed your instructions and tada worked like a charm!!