usermod: -r/--remove is not accepted
Maintainers usually reply within 1 day
A pull request for this has already been merged.
- #370 by @jayhemnani9910 — merged
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 35/100
- Issue type
- Feature
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- linux, rust
- Domain
- authentication, cli
Research direction
Start with the usermod argument parsing and group update paths; the issue does not name files or tests, so locate them from the usermod entry point. Check how -G updates memberships in /etc/group and /etc/gshadow, then compare behavior for -rG, -r alone, and -r with -a against the GNU behavior described. Done means the flag removes only the specified group memberships and invalid combinations exit with status 2.
Written by the indexing model from the issue text.
Description
GNU usermod 4.17 has -r, --remove to take the user out of only the groups given with -G. shadow-rs rejects it:
# usermod -rG daemon u1
error: unexpected argument '-r' found
exit 2, and the user stays in daemon. GNU removes u1 from daemon in /etc/group and /etc/gshadow and leaves its other groups alone. -r without -G and -r with -a are usage errors there (exit 2).
I have a change that adds the flag; happy to open a PR.
GNU shadow 4.17.4 (Ubuntu 26.04). shadow-rs main 1b2d8de.
- Dominant language
- Rust
- Stars
- 17
- Forks
- 10
- Avg merge
- 1d 15m
- Merged PRs (30d)
- 37
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 62/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
uutils/shadow#362 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 5/5 Over a week Newbie friendliness 30/100
Maintainers usually reply within 1 day
Similar issues
-
good first issue help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
servo/rust-smallvec#827 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
nowledge-co/hawdb#1400 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
calcit-lang/caps#16 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
penso/herdr-gpui#934 ·
Maintainers usually reply within 1 day
-
🎉 Add BossanovaOpen
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
jaywcjlove/awesome-mac#4096 ·
Maintainers usually reply within 1 day