Please add WS-Discovery ( WSD ) support for Windows Samba server discovery.

Bug #1831441 reported by Morbius1
46
This bug affects 8 people
Affects Status Importance Assigned to Milestone
samba
Unknown
Unknown
samba (Ubuntu)
Triaged
Wishlist
Unassigned

Bug Description

Please add WS-Discovery ( WSD ) support for Windows Samba server discovery.

Windows 10 disables the smbv1 client dialect on new builds and this in turn disables NetBIOS host discovery in its File manager. Configured this way Win10 will never be able to browse the network and discover a Linux Samba server. With the addition of WSD in Ubuntu Win10 will discover the Linux Samba server using its native WSD protocol.

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] After unzipping it rename the python script:

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

[3] Copy it to /usr/bin

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

[4] 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

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

#User=nobody
#Group=nobody

[6] Then enable the service:

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

Synology already has this incorporated into it's products and some Linux distros like Arch do as well.

Ubuntu 18.04 already announces itself in Samba ( multicast dns register ) using avahi and is browseable to its Linux and MacOS clients so the addition of WSD would make the samba host discoverable to all modern operating systems through their file managers without any user intervention.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in samba (Ubuntu):
status: New → Confirmed
Changed in samba (Ubuntu):
importance: Undecided → Wishlist
status: Confirmed → Triaged
Revision history for this message
Bryce Harrington (bryce) wrote :

Ref. for windows dropping SMB1:
* https://techcommunity.microsoft.com/t5/Storage-at-Microsoft/Stop-using-SMB1/ba-p/425858

Good info on how Samba was affected by this:
* https://superuser.com/questions/1322497/did-windows-10-april-update-break-network-discovery-and-samba-support?rq=1

From Samba's FAQ, it looks like there has been some work upstream at supporting WSD internally, and there is a patch proposed (the master.zip file's README.md references this work):
* https://wiki.samba.org/index.php/FAQ
* https://bugzilla.samba.org/show_bug.cgi?id=11473

Of note, this review comment:

"""
- Is WSD only based on HTTP (via TCP)?
  If so would it make sense to reuse some of source4/web_server/
  and implement WSD in python?
  Just as an idea, using xml in C always scares me..
"""

It would probably be a good idea to post a mention of this wsdd-master to the Samba bug report. They may already be aware of this work, but if not would be helpful to tell them; I don't know if it'd be appropriate for what they need, but worst case they may have useful advice/feedback.

Revision history for this message
Bryce Harrington (bryce) wrote :

Meanwhile, for implementing this particular fix in-distro, it may be cleanest to package wsdd as its own discrete source package, and have Samba depend on it as Recommends. While it is just a single python script, it has several python dependencies, which may be easier to manage separately from samba itself, and the project appears to be actively maintained at present (https://github.com/christgau/wsdd/) so we may expect to see updates to the script.

wsdd is covered under the MIT License, so since this issue likely affects Debian as well, it may be worth submitting the package to Debian. The issue this fixes seems to be fairly widespread so there could be broad interest in this solution.

Revision history for this message
Andreas Hasenack (ahasenack) wrote :

This came up in our "untouched in 180 days" bug triage. I found https://github.com/christgau/wsdd/issues/19 where someone apparently packaged this, but not conforming to the debian policy (as stated by the author), and no ITP bug yet. I found a debian WNPP bug (https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=930339), but for a C version of this service (https://github.com/kochinc/wsdd2), and this was taken from a Netgear NAS according to the README file. It also has received no further commits for more than a year.

Revision history for this message
Bjlockie (bjlockie) wrote :

Maybe include an ubuntu package and make it dependent on samba?
It's been a while, why not do something easy for the user?

Revision history for this message
Lucas Kanashiro (lucaskanashiro) wrote :

Ideally, this package should be included in Debian first, and then we sync it from there. In general, we include Ubuntu-only package if Debian does not agree in including it and we have a compelling reason to do it. If this package is included in Debian we could have more eyes on it and it would reduce the maintenance burden for us in Ubuntu.

I'd recommend to file a ITP (Intent To Package) or RFP (Request For Package) bug in Debian and see what the samba maintainers there will have to say. If you do that, please add a link to the Debian bug here so we can track it as well.

Revision history for this message
Matt Grant (mattgrant) wrote :

Hi!

I am the Debian Developer who has just uploaded wsdd 0.7.0 to Debian Sid unstable.

Salsa package git repo is https://salsa.debian.org/grantma/wsdd

Also uploaded Debian Bullseye backports.

Please feel free to pull into latest Ubuntu :-) even 22.04! Should be good to go.

Revision history for this message
Morbius1 (morbius1) wrote :

I tested this on Ubuntu 20.04 and Mint 20 and it works as advertised. I don't see a path to 22.04 yet but it may be too soon.

I hope there is time to include it into the Ubuntu 22.04 release as either a dependency of the samba package itself or at least as an available separate install within the main Ubuntu repository.

I am very very grateful for your work here. You have made my support job a whole lot easier.

Revision history for this message
Bryce Harrington (bryce) wrote :

> I tested this on Ubuntu 20.04 and Mint 20 and it works as advertised. I don't see a path to 22.04 yet but it may be too soon.

That's good to hear the new package addresses your need.

wsdd is currently in Debian New for manual review. We won't be able to sync it into Ubuntu until that process is finished; if it finishes sufficiently prior to the Feature Freeze for 22.04 (in a few weeks) there might be a chance to import the package into universe.

However, to make this a dependency for Samba would require wsdd be in main, which requires also going through Ubuntu's security review process - aka Main Inclusion Review (MIR) - which is currently pretty heavily backlogged.

So you're probably right that time may be too short for including this in focal/main. 22.10 may be a more realistic objective for inclusion with Samba.

Thanks again for pushing this feature and tackling the testing. Let's see how things develop in Debian.

Revision history for this message
Bryce Harrington (bryce) wrote :

I've uploaded the package to a PPA, to verify it builds in the LP env:

  https://launchpad.net/~bryce/+archive/ubuntu/wsdd

Revision history for this message
Morbius1 (morbius1) wrote :

Since my last post I starting testing Ubuntu 22.04 and noticed there is a package wsdd2. https://packages.ubuntu.com/jammy/net/wsdd2

It's in jammy/universe. I installed it and I can connect to it from Win11 as WSD.

So now I'm confused. Which one is which. They are not the same package but do the same thing - at least from the user's viewpoint.

It will be confusing to have both, right?

Revision history for this message
Morbius1 (morbius1) wrote (last edit ):

This is perhaps outside the responsibility of this venue to answer but I did an apt update on Ubuntu 22.04 today and there are now two wsdd packages:

wsdd2: 1.8.6+dfsg-3
wsdd: 2:0.7.0-1

In the limited tests I have done they both work. I do not know what would happen if both of them were installed at the same time which leads to my question.

Does anyone have any insight on which one is to be used. Are they for different purposes? Development of the wsdd version seems to be more active than the other which makes me inclined to use that one.

Revision history for this message
Utkarsh Gupta (utkarsh) wrote :

Hello,

wsdd comes from https://github.com/christgau/wsdd -> which is a Python implementation:
"wsdd implements a Web Service Discovery host daemon. This enables (Samba) hosts, like your local NAS device, to be found by Web Service Discovery Clients like Windows."

Whereas, wsdd2 comes from https://github.com/Netgear/wsdd2 -> which is a C implementation:
"The primary purpose of this project is to enable WSD on Samba servers so that network shares hosted on a Unix box can appear in Windows File Explorer / Network."

You can choose either to get your work done. As far as I can tell, one doesn't depend on the other so nothing will be broken, really. So go ahead with wsdd as you feel more confident with that. :)

Revision history for this message
Andreas Hasenack (ahasenack) wrote :

wsdd is now in Ubuntu Jammy: https://launchpad.net/ubuntu/+source/wsdd

I haven't tested the integration points, though, but it's a start.

Revision history for this message
Andreas Hasenack (ahasenack) wrote :

Oh, sorry, a previous comment stated that already.

Revision history for this message
Lucas Kanashiro (lucaskanashiro) wrote :

What are the next steps here? Are people willing to try to promote wsdd to main?

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.