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…
Question
Options
- A/etc/pgroup
- B/etc/shadow
- C/etc/passwd
- D/etc/group
- E/etc/gshadow
How the community answered
(50 responses)- A16% (8)
- B6% (3)
- C72% (36)
- D2% (1)
- E4% (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
Community Discussion
No community discussion yet for this question.