usermod: -u and -g exit 0 on a symlinked home, GNU exits 12
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 70/100
Research direction
The issue references PR #349 and commit 49bf35e as the current behavior. Read the usermod command logic for -u/-g with symlinked home directories to find where exit status is set. Done means shadow-rs prints the GNU-style error and exits 12, like GNU shadow 4.17.4.
Written by the indexing model from the issue text.
Description
When the home directory is a symlink, GNU usermod updates /etc/passwd, leaves the files alone, prints an error and exits 12 for -u and -g. shadow-rs updates /etc/passwd, leaves the files alone too (with #349), and exits 0:
# useradd -m alice; groupadd dev
# mv /home/alice /data/alice; ln -s /data/alice /home/alice
# usermod -g dev alice; echo $?
GNU: usermod: Failed to change ownership of the home directory
12
shadow-rs: 0
Same with usermod -u 1500 alice and usermod -u 1500 -g dev alice. A home directory owned by root is skipped quietly by both, with exit 0.
GNU shadow 4.17.4 (Ubuntu 26.04). shadow-rs #349 (49bf35e).
- Dominant language
- Rust
- Stars
- 17
- Forks
- 10
- Avg merge
- 14h 13m
- Merged PRs (30d)
- 14
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 72/100
Maintainers usually reply within 1 day
-
usermod: -m/--move-home is not implementedPossibly taken @jayhemnani9910 claimed this 1 day ago. Open
Difficulty 4/5 3-5 days Newbie friendliness 25/100
Maintainers usually reply within 1 day
-
usermod: -g does not move home directory files to the new primary groupPossibly taken @jayhemnani9910 claimed this 1 day ago. Open
Difficulty 4/5 1-2 days Newbie friendliness 35/100
Maintainers usually reply within 1 day
-
useradd, groupadd: system IDs allocated from the bottom of the rangePossibly taken @jayhemnani9910 claimed this 2 days ago. Open
Difficulty 4/5 1-2 days Newbie friendliness 30/100
Maintainers usually reply within 1 day
-
Dependency DashboardOpen
Difficulty 3/5 1-2 days Newbie friendliness 20/100
Maintainers usually reply within 1 day
Similar issues
-
Small glitchOpenpriority: medium
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
storytold/photocraft#9538 ·
Maintainers usually reply within 1 day
-
bug P2 rust
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
jscott3201/rusty-bacnet#2085 ·
Maintainers usually reply within 1 day
-
area:tag area:tag---json---markdown--n bug factory:dogfood factory:triaged persona:scripter platform:linux-cloud priority:p3 type:bug
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
gitbutlerapp/grit#1940 · 1 comment ·
Maintainers usually reply within 1 day
-
Inconsistent case in names for Windows installation packages compared to all other assetsPossibly taken A pull request linked to this issue is open or already merged. Openarea:ui bug in progress needs-triage
Difficulty 1/5 Under an hour Newbie friendliness 65/100
bherbruck/solvecraft#6769 · 2 comments ·