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,MEMBER2

Parameters & Attributes

NameTypeDescription
GROUPfieldGroup name
PASSWORDfieldGroup password field or placeholder
GIDfieldNumeric group ID
MEMBERSfieldComma-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}'
Linux Reference