nerdexam
LPI

010-160 · Question #40

The following line is found in which system file? root:x:0:0::/root:/bin/bash

The correct answer is C. /etc/passwd. The line root:x:0:0::/root:/bin/bash uses the colon-delimited format unique to /etc/passwd, which stores username, password placeholder, UID, GID, GECOS, home directory, and login shell.

Security and File Permissions

Question

The following line is found in which system file? root:x:0:0::/root:/bin/bash

Options

  • A/etc/user.conf
  • B/etc/shadow
  • C/etc/passwd
  • D/usr/bin/shadow
  • E/etc/password

How the community answered

(32 responses)
  • A
    3% (1)
  • B
    6% (2)
  • C
    91% (29)

Why each option

The line root:x:0:0::/root:/bin/bash uses the colon-delimited format unique to /etc/passwd, which stores username, password placeholder, UID, GID, GECOS, home directory, and login shell.

A/etc/user.conf

/etc/user.conf is not a standard Linux system file and does not store the colon-delimited user account database.

B/etc/shadow

/etc/shadow stores hashed passwords and account aging data in a different multi-field format and is not the file that contains shell or home directory information.

C/etc/passwdCorrect

The /etc/passwd file stores one record per user in the format username:password:UID:GID:GECOS:home:shell. The entry 'root:x:0:0::/root:/bin/bash' shows username root, 'x' indicating the actual password hash is stored in /etc/shadow, UID 0, GID 0, an empty GECOS field, home directory /root, and login shell /bin/bash.

D/usr/bin/shadow

/usr/bin/shadow does not exist as a standard Linux system file - the shadow password file is located at /etc/shadow.

E/etc/password

/etc/password does not exist as a standard Linux system file - the correct filename is /etc/passwd.

Concept tested: Linux /etc/passwd file format and user account storage

Source: https://man7.org/linux/man-pages/man5/passwd.5.html

Topics

#/etc/passwd#user accounts#system files#user database

Community Discussion

No community discussion yet for this question.

Full 010-160 Practice