CNSP practice question 9 of 15

Where are the password hashes stored in the Linux file system?

Full set: 60 questions

Domain Network Security Fundamentals

Answer options
A: /etc/passwd
B: /etc/password
C: /etc/shadow Correct answer
D: /usr/bin/shadow
Correct Answer:
C. /etc/shadow
Explanation

Modern Linux systems follow the “shadow-password” scheme defined in the shadow‐utils project and the Filesystem Hierarchy Standard. The actual password hashes for each local account are stored in the file /etc/shadow, which is readable only by root. The traditional /etc/passwd file still exists but now contains only a placeholder (usually “x” or “”) in the password field, while the real hash is moved to /etc/shadow to protect it from non-privileged users.

Why Incorrect

A. /etc/passwd – Stores account metadata; password field is a placeholder, not the hash.
B. /etc/password – No such standard file in Linux; therefore cannot hold hashes.
D. /usr/bin/shadow – /usr/bin holds executables; no executable called “shadow” that stores hashes.

References

1. man 5 shadow

“DESCRIPTION”

¶1–2: “/etc/shadow contains the password hashes… readable only by root.”

2. man 5 passwd

“DESCRIPTION”

¶3: “The encrypted password… is stored in /etc/shadow.”

3. Linux Foundation

Filesystem Hierarchy Standard v3.0

§4.5 (/etc)

bullet “/etc/shadow”: “Contains the encrypted user password information.”

4. University of Wisconsin–Madison CS 354 Lecture Notes

“Unix Account Files”

slide 5: explains separation of /etc/passwd and /etc/shadow for security.

Scroll to Top