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.
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)- A6% (2)
- B3% (1)
- C72% (23)
- D16% (5)
- E3% (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.
/etc/user.conf is not a standard Linux system file.
/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.
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.
/usr/bin/shadow is not a system configuration file; /usr/bin contains executable binaries.
/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
Community Discussion
No community discussion yet for this question.