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.
Question
Options
- A/etc/user.conf
- B/etc/shadow
- C/etc/passwd
- D/usr/bin/shadow
- E/etc/password
How the community answered
(32 responses)- A3% (1)
- B6% (2)
- C91% (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.
/etc/user.conf is not a standard Linux system file and does not store the colon-delimited user account database.
/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.
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.
/usr/bin/shadow does not exist as a standard Linux system file - the shadow password file is located at /etc/shadow.
/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
Community Discussion
No community discussion yet for this question.