useradd: -U ignored when USERGROUPS_ENAB is no, accepted with -g
Maintainers usually reply within 1 day
A pull request for this has already been merged.
- #345 by @jayhemnani9910 — merged
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 35/100
Research direction
Start with the useradd(8) behavior described in the issue and trace how shadow-rs handles USERGROUPS_ENAB, -U, and -g. Compare both reported command cases with GNU shadow 4.17.4; done means explicit -U creates the user’s group despite the setting, and -U with -g is rejected. Pull request #345 is already open.
Written by the indexing model from the issue text.
Description
useradd(8) describes USERGROUPS_ENAB as the default for -U/-N. shadow-rs lets it override an explicit -U, and accepts -U together with -g:
# echo 'USERGROUPS_ENAB no' >> /etc/login.defs (after removing the existing line)
# useradd -U u1; id u1
GNU: uid=1001(u1) gid=1001(u1) groups=1001(u1)
shadow-rs: uid=1001(u1) gid=100(users) groups=100(users)
# useradd -U -g users u2
GNU: useradd: options -U and -g conflict (exit 2)
shadow-rs: exit 0, creates group u2 and makes it the primary group; -g is ignored
GNU shadow 4.17.4 (Ubuntu 26.04). shadow-rs main 2e1032a.
- Dominant language
- Rust
- Stars
- 17
- Forks
- 10
- Avg merge
- 18h 30m
- Merged PRs (30d)
- 24
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
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Difficulty 3/5 1-2 days Newbie friendliness 62/100
Maintainers usually reply within 1 day
-
pwck: warnings and "no changes" on clean files, nothing after problemsPossibly taken @jayhemnani9910 claimed this today. Open
Difficulty 4/5 3-5 days Newbie friendliness 54/100
Maintainers usually reply within 1 day
-
usermod: -u and -g exit 0 on a symlinked home, GNU exits 12Possibly taken @pierre-warnier claimed this 1 day ago. Open
Difficulty 3/5 1-2 days Newbie friendliness 70/100
Maintainers usually reply within 1 day
-
usermod: -m/--move-home is not implementedPossibly taken @jayhemnani9910 claimed this 3 days ago. Open
Difficulty 4/5 3-5 days Newbie friendliness 25/100
Maintainers usually reply within 1 day
Similar issues
-
documentation enhancement SIEM
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
ADORSYS-GIS/wazuh-agent-status#265 ·
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
manuscript-lang/manuscript#1629 ·
Maintainers usually reply within 1 day
-
autofixer: follow-up
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
tursodatabase/turso#10885 ·
Maintainers usually reply within 1 day
-
🐞 bug
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
nannou-org/gantz#475 ·
Maintainers usually reply within 1 day