010-160 · Question #79
Which files are the source of the information in the following output? (Choose two.) uid=1000 (bob) gid=1000 (bob) groups=1000 (bob), 10 (wheel), 150 (wireshark), 989 (docker), 1001 (libvirt)
The correct answer is B. /etc/passwd C. /etc/group. The output of the id command derives user and primary group identity from /etc/passwd and supplementary group memberships from /etc/group.
Question
Options
- A/etc/id
- B/etc/passwd
- C/etc/group
- D/home/index
- E/var/db/users
How the community answered
(35 responses)- A3% (1)
- B86% (30)
- D9% (3)
- E3% (1)
Why each option
The output of the id command derives user and primary group identity from /etc/passwd and supplementary group memberships from /etc/group.
/etc/id does not exist as a standard Linux file; there is no such system database file.
/etc/passwd stores each user's username, UID, and primary GID, which provides the uid=1000(bob) and gid=1000(bob) portions of the output.
/etc/group stores group names, GIDs, and their member lists, which provides all supplementary group entries such as wheel, wireshark, docker, and libvirt shown in the groups= field.
/home/index does not exist as a standard Linux file; user identity data is not stored under /home.
/var/db/users does not exist as a standard Linux file; user account information is not stored in that path.
Concept tested: Source files for user identity and group membership
Source: https://www.man7.org/linux/man-pages/man5/passwd.5.html
Topics
Community Discussion
No community discussion yet for this question.