GSEC · Question #397
After enabling shadowed passwords in a Linux server, where does Linux keep the passwords?
The correct answer is C. /etc/shadow. When shadow passwords are enabled on Linux, password hashes are moved out of /etc/passwd and stored in /etc/shadow, which has highly restricted permissions.
Question
After enabling shadowed passwords in a Linux server, where does Linux keep the passwords?
Options
- A/etc/passwd
- B/usr/shadow
- C/etc/shadow
- D/usr/passwd
How the community answered
(29 responses)- A10% (3)
- B3% (1)
- C83% (24)
- D3% (1)
Why each option
When shadow passwords are enabled on Linux, password hashes are moved out of /etc/passwd and stored in /etc/shadow, which has highly restricted permissions.
/etc/passwd still exists but with shadow enabled its password field contains only 'x', not the actual hash.
/usr/shadow is not a recognized or valid path in the Linux Filesystem Hierarchy Standard.
The /etc/shadow file stores encrypted password hashes when the shadow password suite is enabled. Unlike /etc/passwd, which is world-readable, /etc/shadow is readable only by root, preventing unprivileged users from obtaining hashes for offline cracking. The /etc/passwd file retains user account metadata but replaces the password field with an 'x' placeholder.
/usr/passwd is not a valid Linux system path; all password and account files reside under /etc.
Concept tested: Linux shadow password file location
Source: https://www.man7.org/linux/man-pages/man5/shadow.5.html
Topics
Community Discussion
No community discussion yet for this question.