WS-Discovery service (wsdd2) running with strange UID not in passwd file

  • Hello,

    I installed LibreELEC 11.0.6 on my Raspberry Pi 5 and happened to notice that my Windows gaming PC picked it up in "Network" despite WS-Discovery and Samba all being turned off on LibreELEC. While trying to figure out why this was happening, I noticed that the /usr/sbin/wsdd2 process has a strange uid of 61623.

    So then I downloaded a fresh image and reinstalled from scratch. Nothing beyond the initial partition wizard, the initial setup wizard where I untick Samba, and the adding of the ssh password and enabling ssh is done, no add-ons, no configuration, no shares added, nothing. (FWIW, I verified the sha256sum at two different locations and burned the image to my SD card on a live boot of raspbian, turned off every other device on my network, and didn't turn ssh on until I had set a new password and checked the output of the commands listed in the code window below).

    Sure enough, after the first reboot, the wsdd2 process spawns, with the same uid.

    As you can see below, it is indeed listening on a few ports despite being turned off and has the mysterious 61623 uid which is absent in the /etc/passwd file.


    All other processes are running either as root or with an account found in /etc/passwd. The only other reference I could find to this was this thread from 2023 where I noticed that wsdd2 has the same uid in OP's pasted crash log:

    blind_oracle
    October 2, 2023 at 7:57 AM

    I was hoping others might be able to shine a light on if this is normal behavior or something of concern. If any other logs/output are required it's no problem but as stated above it's about as vanilla, out-of-the-box as you can get. :)

    Edited once, last by Crackerjack79: Clarity (April 19, 2024 at 4:58 PM).

  • My problem is that WS-Discovery turns itself off from time to time, its mostly working but like every 3-4-5 boots its off, happens on Pi 4 & 5 & Generic, never happens with CE.

  • It’s using the systemd dynamic user. You can see this in /usr/lib/systemd/system/wsdd2.service; and visibility for review in LE13 - https://github.com/LibreELEC/LibreELEC.tv/pull/8705

    Thanks so much for responding, I really appreciate it!

    I was curious as to why the same UID would appear across different installations (and different architectures, at that) when at a glance the systemd docs seem to imply that a random UID between 61184 and 65519 would be assigned to dynamic users.

    However, I *think* I answered my own question - see the code comments at line 185 in dynamic-user.c for how the UID is arrived at:

    systemd/src/core/dynamic-user.c at main · systemd/systemd
    The systemd System and Service Manager . Contribute to systemd/systemd development by creating an account on GitHub.
    github.com

    At any rate, thank you again for the quick response, this project is so great 8)