nerdexam
GIAC

GSEC · Question #156

Which of the following files contains the shadowed password entries in Linux?

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.

Linux and Cryptography

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

How the community answered

(45 responses)
  • A
    2% (1)
  • B
    82% (37)
  • C
    7% (3)
  • D
    9% (4)

Why each option

The /etc/shadow file in Linux stores hashed (shadowed) user passwords and related password aging information, separated from the world-readable /etc/passwd file.

A/etc/passwd

/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.

B/etc/shadowCorrect

The /etc/shadow file was introduced to store encrypted password hashes securely, restricting read access to root only, unlike /etc/passwd which is readable by all users. It also stores password expiration, aging, and account lockout metadata for each user account, making it the definitive location for shadowed password entries.

C/etc/profile

/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

/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

Source: https://man7.org/linux/man-pages/man5/shadow.5.html

Topics

#Linux#shadow passwords#/etc/shadow#password storage

Community Discussion

No community discussion yet for this question.

Full GSEC Practice