aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* sysusers: allow force reusing existing user/group IDs (#8037)Michael Vogt2018-02-011-0/+3
| | | | | | | | | | | | | | | | | | | | | | | On Debian/Ubuntu systems the default passwd/group files use a slightly strange mapping. E.g. in passwd: ``` man:x:6:12::/var/cache/man:/sbin/nologin ``` and in group: ``` disk:x:6: man:x:12: ``` This is not supported in systemd-sysusers right now because sysusers will not re-use an existing uid/gid in its normal mode of operation. Unfortunately this reuse is needed to replicate the default Debian/Ubuntu users/groups. This commit enforces reuse when the "uid:gid" syntax is used to fix this. I also added a test that replicates the Debian base-passwd passwd/group file to ensure things are ok.
* sysusers: ensure GID in uid:gid syntax existsMichael Vogt2018-01-251-1/+1
| | | | | | Ensure that the GID already exists or is created when the new "uid:gid" syntax is used. This ensures the behaviour is always predictable.
* test: add TEST-21-SYSUSERS testMichael Vogt2018-01-251-0/+7
This test tests the systemd-sysuser binary via the --root=$TESTDIR option and ensures that for the given inputs the expected passwd and group files will be generated.