312-50V9 · Question #262
A hacker has managed to gain access to a Linux host and stolen the password file from /etc/passwd. How can he use it?
The correct answer is D. He cannot read it because it is encrypted. In modern Linux systems, /etc/passwd does not store usable password hashes - they are kept in the protected /etc/shadow file - making the stolen file insufficient for extracting working credentials.
Question
A hacker has managed to gain access to a Linux host and stolen the password file from /etc/passwd. How can he use it?
Options
- AThe password file does not contain the passwords themselves.
- BHe can open it and read the user ids and corresponding passwords.
- CThe file reveals the passwords to the root user only.
- DHe cannot read it because it is encrypted.
How the community answered
(15 responses)- B7% (1)
- D93% (14)
Why each option
In modern Linux systems, /etc/passwd does not store usable password hashes - they are kept in the protected /etc/shadow file - making the stolen file insufficient for extracting working credentials.
While technically accurate that modern /etc/passwd does not contain the actual password hashes, this option describes the shadow password architecture but does not address why the attacker cannot use the file, making it an incomplete explanation compared to option D in exam context.
/etc/passwd never stores plaintext passwords in any modern Linux system; it contains account metadata such as username, UID, GID, home directory, and default shell - never readable credentials.
/etc/passwd contains no passwords for any privilege level including root; the file is world-readable precisely because it holds no credential data, which is stored separately in the root-restricted /etc/shadow.
Modern Linux distributions implement shadow password storage, where /etc/passwd contains only an 'x' placeholder in the password field and the actual one-way cryptographic hashes are stored in /etc/shadow, which is readable only by root. A hacker who obtains /etc/passwd cannot extract or use passwords from it because no credential data is present in a recoverable form. Even if hashes were accessible, they are produced by one-way functions and cannot be directly reversed to plaintext passwords.
Concept tested: Linux shadow password file and /etc/passwd security
Source: https://man7.org/linux/man-pages/man5/shadow.5.html
Topics
Community Discussion
No community discussion yet for this question.