nerdexam
LPI

010-150 · Question #41

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

The correct answer is C. /etc/passwd. The colon-delimited format 'root:x:0:0::/root:/bin/bash' is the standard record format of /etc/passwd, identifying username, password field, UID, GID, GECOS, home directory, and 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
    6% (2)
  • B
    3% (1)
  • C
    72% (23)
  • D
    16% (5)
  • E
    3% (1)

Why each option

The colon-delimited format 'root:x:0:0::/root:/bin/bash' is the standard record format of /etc/passwd, identifying username, password field, UID, GID, GECOS, home directory, and shell.

A/etc/user.conf

/etc/user.conf is not a standard Linux system file.

B/etc/shadow

/etc/shadow stores hashed passwords and uses a different colon-delimited format that includes password hash, aging fields, and expiry data - not the UID/GID/shell fields shown.

C/etc/passwdCorrect

The /etc/passwd file stores one user record per line in the format username:password:UID:GID:GECOS:home:shell. The 'x' in the password field indicates the actual hashed password is stored in /etc/shadow. The record shown is the root account entry with UID 0, GID 0, home /root, and shell /bin/bash, which is the exact format used by /etc/passwd.

D/usr/bin/shadow

/usr/bin/shadow is not a system configuration file; /usr/bin contains executable binaries.

E/etc/password

/etc/password is not a standard Linux system file; the correct filename is /etc/passwd.

Concept tested: Linux /etc/passwd file record format

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

Topics

#/etc/passwd#user accounts#file format#system files

Community Discussion

No community discussion yet for this question.

Full 010-150 Practice