Bug#1074789: systemd-sysusers and userdb/io.systemd.DynamicUser socket [was: Bug#1074789: polkitd: postinst configure first install fails due to systemd-sysusers not working]

Lionel Élie Mamane lionel at mamane.lu
Wed Jul 3 20:18:49 BST 2024


Dear systemd maintainers,

The polkitd postinst script invokes systemd-sysusers, and relies on it
being functional, under the sole condition that this binary is
present; in Debian this is equivalent to the systemd package being
installed since /bin/systemd-sysusers is in that package.

Is this a correct assumption or is there an additional condition for
systemd-sysusers to be functional that the polkitd postinst script
should be checking before invocation?

I hit a scenario where it doesn't work, and makes the installation
(configure phase) of polkitd fail, due to the necessary user not being
created. I traced that back to systemd-sysusers trying to connect to
/run/systemd/userdb/io.systemd.DynamicUser

On all my Debian machines, that socket exists but nobody is listening
on it. A polkitd maintainer argues that systemd should be listening on
it, and on his machine it does.

The stdout/stderr of the invocation looks like:

$ sudo systemd-sysusers polkitd.conf
Failed to check if group polkitd already exists: Connection refused

but the return value is 0, which would indicate success. But the user
that should be created is not created. At least this seems to be a bug
in systemd-sysusers; according to usual interface, and as documented
in its man page, if it failed to perform its job, it should return
non-zero.

What is your take on this?

You can see the history of the discussion in bug #1074789
https://bugs.debian.org/1074789

systemd version 252.26-1~deb12u2 on amd64, and systemd-userdbd is not
installed.

Thanks in advance,

-- 
Lionel Mamane



More information about the Pkg-systemd-maintainers mailing list