-
Notifications
You must be signed in to change notification settings - Fork 59
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
Handling of default users/groups #155
Comments
Analogous to what we do for
|
Added a note to the f32 changes tracking ticket about f32 picking up sysusers.d: #372 (comment) |
Self note: |
There is a Fedora change to move user creation to sysusers.d format but this has not been updated in the docs yet (see docs PR). Also, if packages use upstream %sysusers_create_package macro, this creates potential issues as this macro creates all users from all available config files. In Fedora this is currently the case for
Apparently the systemd upstream macro got created on purpose that way, deprecating a previous macro which only consumed specific configuration files, not the whole set of entries, see systemd/systemd#8058 (comment). EDIT(@lucab): added more refs. |
we should bundle in #1201 as part of this. |
* Update install.bu * Update create-ipxe-iso.sh * Update coreos-install.ipxe * Update create-ipxe-iso.sh * temporary sample * triggering action * Update docker-image.yml * Automate ignition file generation from butane * restores previous butane * Automate ignition file generation from butane * Tries to keep var partition * Automate ignition file generation from butane * Adds compose files for apps * Automate ignition file generation from butane * Update coreos-install.ipxe * Automate ignition file generation from butane * Update coreos.bu * Automate ignition file generation from butane * Update coreos-install.ipxe * Automate ignition file generation from butane * Upgrades version * Automate ignition file generation from butane * Adds vim and docker compose * Automate ignition file generation from butane * Update coreos-install.ipxe * Automate ignition file generation from butane * Update README.md * Automate ignition file generation from butane * Automates containers creation * Automate ignition file generation from butane * UID and GID in NFS * Automate ignition file generation from butane * remove binding * Automate ignition file generation from butane * Update coreos.bu * Automate ignition file generation from butane * adds guid * group * removes pcloud due to issues * fixes uid and guid * Fixes group and user * Automate ignition file generation from butane * fixes port * Automate ignition file generation from butane * mariadb install and enable (prototype) * Automate ignition file generation from butane * removes mariadb, changes guid to 1000 * Automate ignition file generation from butane * fixes * Automate ignition file generation from butane * fixes z2mqtt permission, adds dialout group * Automate ignition file generation from butane * no need to create dialout (ignition would fail * Automate ignition file generation from butane * testing group without name * Automate ignition file generation from butane * removing due to coreos bug: coreos/fedora-coreos-tracker#155 * Automate ignition file generation from butane * depends * Automate ignition file generation from butane * jellyfin folders * Automate ignition file generation from butane * rename * Automate ignition file generation from butane * removes old option * Automate ignition file generation from butane * password not needed anymore (was temporary) * Automate ignition file generation from butane * new github action for multiple butane files * fixes paths * action * fixes action * Automate ignition file generation from butane * Splits butane into multiple configs * fixes butane * Fixes remote butanes * Automate ignition file generation from butane
coreos/ignition#1596 requests a workaround in Ignition until FCOS migrates to systemd-sysusers. |
Suggestion of plan in coreos/rpm-ostree#49 (comment) |
Dropping nss-altfilesThis is a proposal / list of steps to move away from using ContextRpm-ostree based systems currently split the user and group definition in two parts, one coming from the image as part of To "merge" those two sources, we use
Where we want to goThe ideal future is that we are not using
New systemsNew systems would start with a set of pre-created system users from the image like today (
The Updating existing systemsExisting systems must retain the current set of users and groups defined as well as their UIDs/GIDs. In order to do that, we’ll need to create an intermediate step where we ship in the image the exact set of systemd sysusers configs matching the current set of defined users/groups. Then we’ll be able to disable Once we are confident that this is working, we would be able to remove |
I wouldn't say that necessarily. I think in some cases we may actually want user/groups "locked" to the system, which could be done via JSON and nss-systemd. It does seem clear to me that e.g. the But e.g. the |
Maybe we should also consider about ostree container ? Not sure if there is any difference about how we handle between OS and container. |
Just a note that while systemd-sysusers makes sense for some things, I actually think we should use nss-systemd and hardcoded static JSON user records for some others. |
Replying to coreos/fedora-coreos-config#2670 (comment) here:
Hmm, but Ignition already has native support for users/groups manipulation via its
? It's not clear to me that the "peek ahead" bit of complexity is worth it. Users are free to create Also, I think we want
The trickiest bit I think will be addressing the "removal" case. That's complication 4 in #155 (comment). Ignition does support Maybe simplest for now is to not support this and try to get proper support for it upstream. Until then, users can always use |
My preferred option would be that we change Ignition to generate and write sysusers files for system users to keep all system user records in that format. Maybe that would not be directly a change in Ignition but in Butane sugar to avoid a spec change. |
To be clear, you're suggesting that Ignition generates |
Only for system users (regular non system users would still be created "manually" by Ignition). We would still need a split of the files stage which is not ideal indeed. |
This means to make sure all configs under |
Summary of a side discussionWe've clarified the following steps, which are not in order as they are somewhat inter-dependent:
System users on new systemsWe can either:
The second option is likely the safest as it has less potential for failures. How to update existing systemsExisting systems require a migration step to "merge" the content of the user/group definitions in Support defining users in Ignition configs via sysusers config filesThis will be split from this issue as this requires work in Ignition. Instead of splitting the Ignition files stage in two, Jonathan suggested that we add a We can then add a warning / error in Butane if sysusers files are included in the files section to guide users to write them in this dedicated sections instead. |
I might misunderstood, in this case |
Default is `false`, if `true`: - turns off nss-altfiles support - disables the passwd / group files migration to /usr/lib Xref to coreos/fedora-coreos-tracker#155 (comment)
Removed the F40 tag as this is not landing in Fedora 40. |
Should we add the |
I'm adding it to #1599 |
Sorry for the delay, will put it to my plate. |
TODO list:
|
Related discussion on the Fedora ML: https://lists.fedoraproject.org/archives/list/[email protected]/thread/IKWECWMBWN2IDKLHK3Q2TZKVSVFTXUNA/ |
What would be the process for removing users with systemd-sysusers? |
Probably no, see https://systemd-devel.freedesktop.narkive.com/U2N8UjeQ/systemd-sysusers |
De-provisioning users is an important, but often neglected part of user account management. Having a good way to ensure users are removed would be nice. |
Removing a user is inherently a process that depends on what the user has been used for. Should the data be kept or wiped? etc. If you don't want to have to answer those questions or manage that, use systemd's DynamicUsers feature. |
90% of this is generic fedora/ostree issues; I'm still hoping we can target rebasing FCOS on bootc, so I'd like to mostly track sysusers stuff there nowadays instead of duplicating it for fcos/silverblue/iot/etc. I filed https://gitlab.com/fedora/bootc/tracker/-/issues/31 |
We need a way to provide default users/groups which:
CL and AH use a mix of nss-altfiles, which fails point 2; systemd-sysusers, which fails point 1; and hardcoded entries in
/etc/{passwd,group}
, which fails point 3.It appears that the consensus approach is to switch to systemd-sysusers and drop nss-altfiles:
experimental/sysusers
option rpm-ostree#1679Complications:
root
andcore
we may need to do something else.core
user, for which see core user isn't added to groups when created via Ignition fedora-coreos-config#41.The text was updated successfully, but these errors were encountered: