26 ms·
leni536 is correct, the range is specified at compile time. https://github.com/systemd/systemd/blob/v239/doc/UIDS-GIDS.md https://github.com/systemd/systemd/bl
by LukeShu 8y ago
leni536 is correct, the range is specified at compile time.
https://github.com/systemd/systemd/blob/v239/doc/UIDS-GIDS.md https://github.com/systemd/systemd/blob/v239/doc/UIDS-GIDS.m...
However, do note that if the service file sets a User= name, and that username already exists, then it will simply use that user, and disable DynamicUser for that service. All of the service files that ship with systemd itself set User=, making this possible for them, but 3rd-party service files might not.
One thing you could look in to is writing a systemd generator (see the systemd.generator(7) man page) that injects User= in to DynamicUser=yes service files, and then ensures that local system users with each of those names exist.