nerdexam
LPI

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.

Security and File Permissions

Question

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)

Options

  • A/etc/id
  • B/etc/passwd
  • C/etc/group
  • D/home/index
  • E/var/db/users

How the community answered

(35 responses)
  • A
    3% (1)
  • B
    86% (30)
  • D
    9% (3)
  • E
    3% (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.

A/etc/id

/etc/id does not exist as a standard Linux file; there is no such system database file.

B/etc/passwdCorrect

/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.

C/etc/groupCorrect

/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.

D/home/index

/home/index does not exist as a standard Linux file; user identity data is not stored under /home.

E/var/db/users

/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

#/etc/passwd#/etc/group#user information#id command

Community Discussion

No community discussion yet for this question.

Full 010-160 Practice