/etc/group
Cheat sheet · https://pcornel.dk/topic.php?topic=2703
Answer
/etc/group lists local groups: name:x:GID:members. Supplementary members are listed there; a user's primary group comes from /etc/passwd.
Remember
Edit with groupadd, gpasswd -a/-d or usermod -aG, or vigr — not a plain editor. A user's primary group is not listed in the members field.
First checks
grpck -r— check group file consistencyid <user>— UID, primary group and groupsgetent passwd <user>— account entry (local or directory)getent group <group>— group memberssudo -l -U <user>— what the user may run with sudo
Commands
getent group aliceid -nG <user>sudodocker
Verify in this order
group defined with a GID → members listed → loaded at login → used in permission checks
Where it usually breaks
First mismatch in identity/group resolution → Unix mode/ACL/capability → mount/sandbox constraint → SELinux/AppArmor policy → credential/TLS trust → protected operation; preserve identity/native diagnostic/pre-state before mutation.
Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=2703