-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ws: please provide sysusers.d entries for system users/groups #15027
Labels
Comments
lucab
changed the title
ws: please provide sysuser.d entries for system users/groups
ws: please provide sysusers.d entries for system users/groups
Dec 9, 2020
I will work on that now, we've postponed this too often. We originally considered moving to |
1 task
Done in PR #18112 |
martinpitt
added a commit
to martinpitt/cockpit
that referenced
this issue
Jan 4, 2023
Move to using systemd's sysusers declarative files [1] for creating our system users/groups. Arch already does that, Fedora moved to it since Fedora 32 [2], and Debian supports it as well [3]. In debian/cockpit-ws.postinst, move the `#DEBHELPER#` block above the statoverride, as the former now generates the user, and the latter needs it. Unfortunately Fedora/rpm's `%attr` does not really work with sysusers files shipped upstream yet. The conf files are not installed yet during `%pre`, but creating the users in `%post` is too late for the file unpack phase, so cockpit-session would get the wrong permissions. Thus duplicate the two sysusers config lines verbatim in `%pre`, which is at least marginally better than calling `useradd` etc. programmatically. Extend TestConnection.testWsPackage to remove the system users, reboot, and validate that cockpit still works. This ensures correct sysusers.d packaging across all distributions, as our normal CI images already have the system users. Fixes cockpit-project#15027 [1] https://www.freedesktop.org/software/systemd/man/sysusers.d.html [2] https://fedoraproject.org/wiki/Changes/Adopting_sysusers.d_format [3] https://manpages.debian.org/dh_installsysusers
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It looks like most socket and service units for
cockpit-ws
support running under custom system users/groups (e.g.@user@
/@wsinstanceuser@
, and related groups) from autoconf.It would be nice to provide separate sysusers.d files with relevant entries for each of those, so that downstream distributions could automatically pick up the system user/group creation in a uniform way (see https://fedoraproject.org/wiki/Changes/Adopting_sysusers.d_format for an example from Fedora).
The text was updated successfully, but these errors were encountered: