Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

groupmod -U: members change in /etc/group but not in /etc/gshadow

Closed Beginner friendly
#367 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

A pull request for this has already been merged.

  • #369 by @jayhemnani9910 — merged

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
79/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
rust
Domain
backend

Research direction

Start in src/uu/groupmod/src/groupmod.rs, especially around line 178 where the issue says gshadow is opened only for -n and -p. Trace how -U and -a update the group member list, then compare the result in /etc/group and /etc/gshadow; done means both files reflect added and removed members consistently.

Written by the indexing model from the issue text.

Description

groupmod -U updates the member list in /etc/group and leaves the one in /etc/gshadow as it was, so the two files disagree:

# groupadd g1
# gpasswd -a root g1
# groupmod -U daemon g1
# grep ^g1 /etc/group /etc/gshadow
/etc/group:g1:x:1001:daemon
/etc/gshadow:g1:!::root
# grpck -r
'daemon' is a member of the 'g1' group in /etc/group but not in /etc/gshadow
'root' is a member of the 'g1' group in /etc/gshadow but not in /etc/group

GNU groupmod 4.17.4 writes daemon to both files. groupmod -a -U has the same gap. A user removed with -U stays a member in gshadow.

groupmod opens gshadow only for -n and -p (src/uu/groupmod/src/groupmod.rs:178), so the member change never reaches it. I have a fix that applies the same -U/-a change to the gshadow entry; happy to open a PR.

GNU shadow 4.17.4 (Ubuntu 26.04). shadow-rs main 1b2d8de.

Dominant language
Rust
Stars
18
Forks
10
Avg merge
1d 15m
Merged PRs (30d)
37

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from uutils/shadow

All issues in uutils/shadow

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.