configuration
/etc/group — Local group records
Local groups have four colon-separated fields. The fourth contains explicit member names separated by commas; a user whose primary GID matches the group need not appear in that list. Group password handling varies; do not put secrets into examples. NSS may consult external group sources. Changes to group membership generally require new credentials in the affected session; verify with id in a new authorized session.
Formal Syntax & Structure
linux syntaxlinux
GROUP:PASSWORD:GID:MEMBER1,MEMBER2Parameters & Attributes
| Name | Type | Description |
|---|---|---|
| GROUP | field | Group name |
| PASSWORD | field | Group password field or placeholder |
| GID | field | Numeric group ID |
| MEMBERS | field | Comma-separated explicit members; may be empty |
Return Value
configuration or inspection
Group record, not an exhaustive list of process group memberships. getent group NAME queries NSS.
Working Example
Example Snippetlinux
printf '%s\n' 'bmteam:x:2001:bmstudent,bmhelper' | awk -F: 'NF==4 {print $1, $3, $4}'