mirror of
https://github.com/flatcar/scripts.git
synced 2025-10-06 13:01:44 +02:00
Package users nowadays get created through systemd-sysuser files. Gentoo uses the acct-user|groups packages to allocate stable IDs for these users. Since they get created at runtime, we have the problem that they end up in /etc/passwd at boot time which would be fine if they follow the acct-user allocations but it could also be that there is a package that uses its own sysuser files, leading to dynamic ID allocation which we can't control and may result in ugly user ID mismatches that are hard to resolve again. Normally we intend to ship all system users under /usr/share/baselayout/passwd so that /etc/passwd is really left to the user's own entries. Generate the /etc/passwd sysuser entries at image build time and move these entries over to /usr/share/baselayout/passwd so that all system users reside in this database. We should still ensure to have acct-user packages for all system users or at least hardcoded user IDs, therefore, add a check for that.