GIAC
GSEC · Question #156
GSEC Question #156: Real Exam Question with Answer & Explanation
The correct answer is B. /etc/shadow. The /etc/shadow file in Linux stores hashed (shadowed) user passwords and related password aging information, separated from the world-readable /etc/passwd file.
Question
Which of the following files contains the shadowed password entries in Linux?
Options
- A/etc/passwd
- B/etc/shadow
- C/etc/profile
- D/etc/shdpwd
Explanation
The /etc/shadow file in Linux stores hashed (shadowed) user passwords and related password aging information, separated from the world-readable /etc/passwd file.
Common mistakes.
- A. /etc/passwd stores user account information such as username, UID, GID, home directory, and shell, but in modern shadow-enabled Linux systems the password field contains only an 'x' placeholder - not the actual hash.
- C. /etc/profile is a shell initialization script that sets system-wide environment variables and startup programs for interactive login shells, and contains no password data.
- D. /etc/shdpwd is not a standard or valid Linux system file; it does not exist in any standard Linux distribution.
Concept tested. Linux shadow password file location and purpose
Reference. https://man7.org/linux/man-pages/man5/shadow.5.html
Community Discussion
No community discussion yet for this question.