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

usermod: -g does not move home directory files to the new primary group

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

I maintainer di solito rispondono entro 1 giorno

@jayhemnani9910 ci sta già lavorando.

Dal 24/10/2026.

  • #349 di @jayhemnani9910 — aperta

Valutazione

Difficoltà
4/5
Tempo stimato
1-2 giorni
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Ferma
Stack tecnologico
linux, rust

Direzione di ricerca

Start by comparing usermod -g with the existing -u home ownership handling; the issue says -u already changes ownership this way, but gives no file or test paths. Reproduce the shown case and check that only entries in the home directory owned by the previous primary group change group, including symlinks themselves. Confirm other groups, files outside the home directory, and combined -g and -d behavior remain unchanged; pull request #349 is already open.

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

Descrizione

usermod(8), -g: "Any file from the user's home directory owned by the previous primary group the user was member of will be owned by this new group." shadow-rs changes the GID in /etc/passwd and leaves the files alone:

# useradd -m alice; groupadd dev
# touch /home/alice/f; chown root:alice /home/alice/f
# usermod -g dev alice
# stat -c '%n %U:%G' /home/alice /home/alice/.bashrc /home/alice/f
GNU:        /home/alice alice:dev    /home/alice/.bashrc alice:dev    /home/alice/f root:dev
shadow-rs:  /home/alice alice:alice  /home/alice/.bashrc alice:alice  /home/alice/f root:alice

GNU changes the group of every entry in the home directory that had the old primary group, whoever owns it, including symlinks themselves. Files in other groups, files outside the home directory, and -g together with -d keep their group. -u already re-owns the home directory this way.

GNU shadow 4.17.4 (Ubuntu 26.04). shadow-rs main 2e1032a.

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

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.