Describe the bug
Normal users usually get UIDs in the range of >=1000 when the Perl-based users script is activated:
|
my ($min, $max, $up) = $isSystemUser ? (400, 999, 0) : (1000, 29999, 1); |
This is not the case when systemd.sysusers.enable is enabled, as new normal users may receive a UID in the range of <1000.
Steps To Reproduce
Steps to reproduce the behavior:
- Open
systemd-sysusers-mutable.nix test.
- Add the following line at the end of the "normalo user is created" subtest:
print(machine.succeed("id -u normalo"))
- Run the test using
nix -L build .#nixosTests.systemd-sysusers-mutable
Expected behavior
UID allocation behavior is the same as in the Perl users script.
Notify maintainers
@nikstur
Metadata
Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.
- system: `"x86_64-linux"`
- host os: `Linux 6.9.7-xanmod1, NixOS, 24.05 (Uakari), 24.05.20240702.706eef5`
- multi-user?: `yes`
- sandbox: `yes`
- version: `nix-env (Nix) 2.22.2`
- nixpkgs: `/etc/nix/inputs/nixpkgs`
Add a 👍 reaction to issues you find important.
Describe the bug
Normal users usually get UIDs in the range of
>=1000when the Perl-based users script is activated:nixpkgs/nixos/modules/config/update-users-groups.pl
Line 85 in c0d0be0
This is not the case when
systemd.sysusers.enableis enabled, as new normal users may receive a UID in the range of<1000.Steps To Reproduce
Steps to reproduce the behavior:
systemd-sysusers-mutable.nixtest.print(machine.succeed("id -u normalo"))nix -L build .#nixosTests.systemd-sysusers-mutableExpected behavior
UID allocation behavior is the same as in the Perl users script.
Notify maintainers
@nikstur
Metadata
Please run
nix-shell -p nix-info --run "nix-info -m"and paste the result.Add a 👍 reaction to issues you find important.