Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

usermod: -u and -g exit 0 on a symlinked home, GNU exits 12

Aperta
#351 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
70/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
rust
Ambito
cli

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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).

Lingua principale
Rust
Stelle
17
Fork
10
Merge medio
15h 14m
PR unite (30g)
15

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di uutils/shadow

Tutte le issue di uutils/shadow

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.