nerdexam
LPI

102-500 · Question #2

Which of the following files assigns a user to its primary group?

The correct answer is C. /etc/passwd. /etc/passwd assigns a user to their primary group via the fourth field (GID), which maps to a group ID defined in /etc/group - making C correct. /etc/group (D) lists group memberships and supplementary group members, but it doesn't define which group is a user's primary one…

Administrative Tasks

Question

Which of the following files assigns a user to its primary group?

Options

  • A/etc/pgroup
  • B/etc/shadow
  • C/etc/passwd
  • D/etc/group
  • E/etc/gshadow

How the community answered

(50 responses)
  • A
    16% (8)
  • B
    6% (3)
  • C
    72% (36)
  • D
    2% (1)
  • E
    4% (2)

Explanation

/etc/passwd assigns a user to their primary group via the fourth field (GID), which maps to a group ID defined in /etc/group - making C correct. /etc/group (D) lists group memberships and supplementary group members, but it doesn't define which group is a user's primary one. /etc/shadow (B) stores hashed passwords and account aging data, with no group information. /etc/gshadow (E) stores secure group account information (group passwords and admins), not primary group assignments. /etc/pgroup (A) doesn't exist as a standard Linux file.

Memory tip: Think of /etc/passwd as the user's own record - it contains everything personal to that user, including their primary group ID. /etc/group is the group's record, listing who belongs to it as a supplementary member.

Topics

#user accounts#group assignment#/etc/passwd#system files

Community Discussion

No community discussion yet for this question.

Full 102-500 Practice