AD Host Discovery

NethServer Version: 7.7.1908 (final)
Module: Fileserver

Hi All,

After setting up afileserver on a ad domain with a functional level of server 2016 I notice I can’t see my nethserver fileserver from windows auto discovery (in windows explorer network).

I’ve doen some reading up and this appears to be because later versions of windows don’t support discovery by NETBIOS name.

I found a project here:

That adds support for web service discovery but didn’t want to duplicate functionality that already exists so my question is is there already a way of doing this?

If not I’ll go ahead and add the wsd daemon.

It’s not supported within Samba and I didn’t find code containing wsd on NethServer github so I don’t think this feature is implemented

https://wiki.samba.org/index.php/FAQ#Why_does_Windows_Network_Neighborhood_not_show_Samba_server.28s.29.3F

Please share your work. I changed the topic from support to feature request.

I think we do not have such thing. Since the software is a simple python script, I think you can add it to the installation without much troubles :wink:

Yes,
To be hionest I thought it was a pretty cool little script and like you say easy to implement but I didn’t want to duplicate anything unneecessarily.

Do you think it’s maybe worth adding to future releases of nethserver?

I don’t know, nobody requested it before :slight_smile:

Let’s start with an howto, if many people will use it, we will try to turn it into a module :wink:

Hi,
Got it tested working and converted to a systemd service to start at boot. So can write that up here if you like .

2 Likes

Here’s a recent article with examples (gentoo and debian-based distros) on using wsdd:

1 Like

Hi,

That’s a good comprehensive article, I already have it all working using sumilar methods but it might help others who need it.

I think maybe a lot of people end up just putting up with things like poor host discovery in windows networks but using this makes it work more how it should do in the first place :slight_smile:

Just realised I never actually wrote this up properly I’m rebuilding my fileserver so thought I should do it this time. :grinning:

so here we go:

Wsdd is a simple python script that automates the publishing of resources on a windows network using a Web Service Discovery Protocol client and host (GitHub - christgau/wsdd: A Web Service Discovery host daemon.).

It can be easily installed on CentOS and therefore nethserver by running a terminal and entering:

yum install wsdd

Although this installs it on nethserver it doesn’t convert it to an automated task, to do this it should be converted to a systemd service which will be automatically started and managed by systemd whenever your system starts up.

To do this list the networks on your system by typing:
“ip addr”
in a terminal identify the IP address you want to advertise on:

This will return something similar to the text below:

ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: ens160: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
link/ether 00:50:56:9a:41:8c brd ff:ff:ff:ff:ff:ff
inet 192.168.1.2/23 brd 192.168.1.255 scope global dynamic ens160
valid_lft 2124sec preferred_lft 2124sec
inet6 fe80::250:56ff:fe9a:418c/64 scope link
valid_lft forever preferred_lft forever

From that I can see that the id of the NIC I wish to advertise on is ens160.

Now we know this create a new file “/etc/systemd/system/wsdd.service”
and enter the following text:

[Unit]
Description=Linux Web Service Discovery Script
After=network.target

[Service]
Type=simple
ExecStart=/usr/bin/wsdd -i ens160
TimeoutStartSec=0

[Install]
WantedBy=default.target

and save (make sure you’ve modified it for your NIC id!).

Then check system is all up to date, (either from nethserver software centre or by entering
yum update -y ).

now we need to enable the service do this by entering “systemctl enable wsdd.service”
This creates a symlink for our service in the default.target location so that it will be auto started on next boot.

2 Likes

Hi @jcp2mill

IMHO there’s something - Important - missing here.

In the above example, the NIC was shown as ens160, with an IP 192.168.1.2/23…

However, and this is the critical point: All longtime NethServer users with AD know that NethServer creates the AD as a container, and as a result the NIC doesn’t have an IP address, but the newly created br0 (Bridge).

Ergo: The example above can’t be a NethServer with AD… :frowning:

So what’s correct here?

My 2 cents
Andy

Hi. Thanks for sharing the details.
Haven’t tried it yet but from what I see the install package already comes with a systemd wsdd.service file. network interface not specified directly there but probably in its etc config file.

There is a separate package for the file shares (ibays) and for AD. Not sure how WSDD is handling that (just discover samba hosts, any samba and Windows host (not AD per se) or something else):

For Nethserver to be found by WSD clients:

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.

For NethServer acting as a client to discover other WSD hosts:

It also implements the client side of the discovery protocol which allows to search for Windows machines and other devices implementing WSD. This mode of operation is called discovery mode.

Hi Andy,

I wasn’t aware of that but all I can say is that it works for me, my nethserver install is set up as a file server and connected to windows 2019 domain and it now appears in windows explorer and I can browse shares etc from there. Whether this is more by luck than judgement I’m not sure.

From the windows domain I can now see my nethserver VM as a discovered host . For what I understand windows discovers it using the WSD service provided by the fdphost* service provided on a standard windows install which whilst not part of active directory is in my opinion much more reliable than WINS etc.
(* Function Discovery Provider Host - fdPHost.dll - Program Information)

Hi,

I guess it makes sense that it somes with it’s own package I originally installed it from github and just ran it directly as a python script and didn’t really look into differences in the package in too much detail so just followed my original steps.

I’ll have a look later and update the steps.

Ok had a look at the provided service and docs and the -i argument is optional without this wsdd will advertise on all available interfaces.

The default service included in the package runs it in that mode as such by default a lot of my steps are not required at all (at least be default) and can be modified to:

Wsdd is a simple python script that automates the publishing of resources on a windows network using a Web Service Discovery Protocol client and host (GitHub - christgau/wsdd: A Web Service Discovery host daemon.).

It can be easily installed on CentOS and therefore nethserver by running a terminal and entering:

yum install wsdd

This installs the python wsdd package but doesn’t convert it to and automatically started service

to do this enter

“systemctl enable wsdd.service”

and to start the service immediately enter:

“systemctl start wsdd.service”

or reboot and the wsdd service should now be running on all network interfaces and your nethserver machine should be visible to windows devices via the web discovery protocol, ( the same protocol used by some printers etc which is part of a base windows install)

I’ve checked this and it still works with no issues.

2 Likes

Hi @jcp2mill

Well, on a NethServer acting as AD it doesn’t work, at least not with NethServer’s IP. I haven’t tried the AD IP (AD has a different IP on NethServer).

I tried on two different (productive) NethServers, both are AD and FileServers, on both no effect…

On 2 Windows 10 PCs, the NethServer doesn’t show up. Connection is possible, but needs entering the hostname or IP… Browsing is not possible.

My 2 cents
Andy

Hi Andy,

Ok if I understand you correctly that’s a bit different to my setup as my domain is windows based with my nethserver vms just connected as clients, a Nethserver hosted domain is not so easy for me to test.

That said did you try it with the packaged service rather than my custom one so that it advertises on all interfaces?

Also not sure why but I has to do an update on my install before the wsdd script would run on my system.

Before that I got an error when I did a systemctl status wsdd.service
Before this the service wasn’t starting properly .

Hi

By all signs, it “should” be running correctly - but it isn’t… :frowning:

I used both, packaged and custom, both to no avail.

The service is running, can be verified by command.
But Windows does not show my NethServer…
I can connect, but need to fill out by hand as browsing is not possible.

My 2 cents
Andy

My “custom” version:


————————————————————
Setup WSDD
————————————————————

yum install -y wsdd

nano /usr/lib/systemd/system/wsdd.service

systemctl daemon-reload
systemctl restart wsdd
systemctl status wsdd

Example:
ExecStart=/usr/bin/wsdd --shortlog -p -d ANWI-R1 -n AWR1-Neth-FSrv

Hi Andy,

I wonder if the fdphost service isn’t runnign on your windows PC’s for some reason?

I have mine set to run both fdphost and fdrespub as I find they’re discovered more reliably by other windows clients then as well but it’s always seemed like fdphost was enabled by default.
( it might be that it’s switched on by something I’m not aware of though).

At the moment, I have the additional problem, that it’s not possible to open up the Windows 10 Network settings - it just closes without any error message. It seems, from the forums, that this happens on Windows 10, when upgraded from Windows 7 - not on every one, but a lot…

Both Windows are stuck on public network… :frowning:

If you’re out of work, get a Windows box… :slight_smile:

Most of times is a user problem… And anyway, many issues can be easily solved with preventive maintenance.