010-150 · Question #45
Which statement about users and user groups is correct?
The correct answer is D. Every user belongs to a least one user group. Every Linux user is assigned a primary group at creation time, meaning all users belong to at least one group.
Question
Which statement about users and user groups is correct?
Options
- AA group can only have one main user.
- BThere can be only one user group on a system.
- CUsers do not have to belong to a user group.
- DEvery user belongs to a least one user group.
How the community answered
(61 responses)- A5% (3)
- B2% (1)
- C8% (5)
- D85% (52)
Why each option
Every Linux user is assigned a primary group at creation time, meaning all users belong to at least one group.
A group can contain any number of users as members; there is no one-user limit imposed by the group model.
Linux systems routinely have dozens or hundreds of groups (wheel, sudo, audio, video, etc.) in addition to user-private groups.
Every user has a mandatory primary group recorded in /etc/passwd; group membership cannot be absent.
When a user account is created with useradd, a primary group is always assigned - either an existing group specified with -g or a new group with the same name as the user (the user private group scheme). This primary group is stored as the GID field in /etc/passwd, so it is impossible for a user to exist without group membership.
Concept tested: Linux mandatory primary group assignment for users
Source: https://man7.org/linux/man-pages/man8/useradd.8.html
Topics
Community Discussion
No community discussion yet for this question.