Hi,
On Sat, 5 Jul 2025 16:51:22 +0200 Paul Gevers <elb...@debian.org> wrote:
I'm not well versed in this systemd stuff, but don't you now have two
competing methods? I mean, if both adduser and systemd-sysusers are
installed and configured, what will happen? And I guess adduser can be
not yet configured if systemd-sysusers is already configured, will the
logic in your preinst then do the right thing?
In short, yes, it works* in any combination of the two prerequisites.
What is expected is that both `adduser` and `systemd-sysusers` only kick
in if the UID/GID doesn't yet exists, so there is no double creation of
the same IDs. I've tested with all combinations of adduser is
preinstalled, systemd-sysuser is preinstalled, both, neither; all finish
installation fine.
*: One minor thing is that systemd-sysuser is actually a virtual
package, and one of the providers is `opensysusers` which doesn't parse
the "u!" syntax recommended by `man sysusers.d` [1]:
Type u may be suffixed with an exclamation mark ("u!") to
create a fully locked account. This is recommended [..]
Changing it to "u" makes it work on systems that *only* have
opensysusers (on other systems the adduser variant will create the IDs
anyhow).
So questions is whether we should change the syntax (although that goes
against the recommendation) or disallow opensysusers as a prereq (and/or
file a bug against that package?).
BR,
--
Gábor (original author of the fix)
[1] https://www.man7.org/linux/man-pages/man5/sysusers.d.5.html