41ea61d59c
Some software decides based on uid/gid whether a user is a system or normal (human) user, with different behaviour for those flavors (example journald [2]). So adding logic to create system-users is necessary, we take the now common ranges from [1]. This extends the mkusers script to allow -2 for uid/gid, this argument will take an identifier from the user range. All identifiers used up to now should have been from the system range, so -1 is now interpreted as a system user/group. Note that after this commit, all the UIDs and GIDs that are created automatically (with -1) will change. That means if there is peristent data on an existing system that was created by such an automatic user, it will suddenly belong to a different user. However, this could already happen before: if a USERS line is added to a package, then other UIDs may change as well. Add system/user ranges as variables, and the argument for user/system uid variable as well. Thus some magic constants could be removed, some further occurences of -1 were replaced with equivalent logic. For consistency, the existing MIN/MAX_UID/GID variables are renamed to FIRST/LAST_USER_UID/GID. Update the documentation with the new automatic ranges. [1] - https://systemd.io/UIDS-GIDS/ [2] - https://www.freedesktop.org/software/systemd/man/journald.conf.html Signed-off-by: Norbert Lange <nolange79@gmail.com> [Arnout: use -1 for system users; refactor the changes a bit] Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> |
||
---|---|---|
.. | ||
conf | ||
manual | ||
website | ||
images |