nerdexam
LPI

102-500 · Question #58

Which of the following information is stored in /etc/shadow for each user?

The correct answer is C. The hashed password of the user. /etc/shadow stores hashed passwords (and password-related metadata like expiry dates), deliberately separated from /etc/passwd so only privileged processes can read it. Option A is wrong because last login timestamps are tracked in /var/log/lastlog or /var/run/utmp. Option B is…

Administrative Tasks

Question

Which of the following information is stored in /etc/shadow for each user?

Options

  • AThe timestamp of the user's last login
  • BThe user's private SSH keys
  • CThe hashed password of the user
  • DThe numerical user ID (UID)
  • EThe path to the user's home directory

How the community answered

(23 responses)
  • A
    9% (2)
  • B
    4% (1)
  • C
    70% (16)
  • D
    17% (4)

Explanation

/etc/shadow stores hashed passwords (and password-related metadata like expiry dates), deliberately separated from /etc/passwd so only privileged processes can read it. Option A is wrong because last login timestamps are tracked in /var/log/lastlog or /var/run/utmp. Option B is wrong because SSH private keys live in the user's ~/.ssh/ directory, never in system files. Option D is wrong because the UID lives in /etc/passwd. Option E is wrong because the home directory path is also stored in /etc/passwd.

Memory tip: Think of /etc/shadow as the vault - it holds only the one secret thing (passwd can't safely store): the password hash. Everything else (UID, home dir, shell) is in the "public" /etc/passwd.

Topics

#user-authentication#password-storage#/etc/shadow#Linux-files

Community Discussion

No community discussion yet for this question.

Full 102-500 Practice