useradd, groupadd: system IDs allocated from the bottom of the range
Maintainers usually reply within 1 day
Assessment
- Difficulty
- 4/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 30/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Stale
- Tech stack
- linux, rust
- Domain
- backend, operating-systems
Research direction
Read the useradd -r and groupadd -r ID allocation paths and compare their system ID behavior with the regular account allocation rule added in #263. Reproduce the listed command sequences, including the explicit UID and deletion cases, and check how the allocation handles occupied IDs and gaps. Done means system IDs follow the GNU ordering described in the issue; pull request #344 is already open.
Written by the indexing model from the issue text.
Description
useradd -r and groupadd -r hand out the lowest free ID in SYS_UID_MIN..SYS_UID_MAX. GNU shadow 4.17.4 (Ubuntu 26.04) counts down from the top:
# useradd -r a; useradd -r b; id -u a b
GNU: 999 998
shadow-rs: 101 102
# groupadd -r ga; getent group ga
GNU: ga:x:999:
shadow-rs: ga:x:101:
GNU goes one below the lowest system ID already in use (after useradd -r -u 500 x the next is 499, and after deleting the newest system user the next one still gets a fresh ID), and fills the highest gap once the bottom of the range is reached. Regular accounts already follow the matching rule upwards since #263 (one past the highest in use).
The same sequence of commands gives different IDs than on a GNU system.
shadow-rs main 2e1032a.
- Dominant language
- Rust
- Stars
- 17
- Forks
- 10
- Avg merge
- 15h 14m
- Merged PRs (30d)
- 15
Getting set up
- Ships a Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from uutils/shadow
-
chfn, chsh: print a line on stderr after a successful changePossibly taken @jayhemnani9910 claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
Maintainers usually reply within 1 day
-
passwd: -l, -u, -d, -e and the aging options print a different message than GNU passwdPossibly taken @jayhemnani9910 claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
Maintainers usually reply within 1 day
-
chage: -i/--iso8601 is not acceptedPossibly taken @jayhemnani9910 claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
usermod: -u and -g exit 0 on a symlinked home, GNU exits 12Possibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 3/5 1-2 days Newbie friendliness 70/100
Maintainers usually reply within 1 day
Similar issues
-
A-UI C-Bug S-Needs-Triage
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
bevyengine/bevy#26330 ·
Maintainers usually reply within 2 days
-
Difficulty 1/5 Under an hour Newbie friendliness 72/100
chipsalliance/caliptra-sw#4335 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
aaif-goose/goose#13158 ·
Maintainers usually reply within 1 day
-
agent enhancement provider:anthropic providers triaged
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
can1357/oh-my-pi#17148 · 1 comment ·
Maintainers usually reply within 1 day
-
A-documentation good first issue
Difficulty 1/5 Under an hour Newbie friendliness 82/100
rust-lang/rust-clippy#17926 · 1 comment ·
Maintainers usually reply within 1 day