nerdexam
LPI

102-500 · Question #142

Why is /etc/shadow not world readable if the passwords are stored in an encrypted fashion?

The correct answer is A. The encrypted passwords are still subject to brute force attacks. Even though passwords in /etc/shadow are hashed (not encrypted), hashing is a one-way transformation - not decryption protection. If the file were world-readable, any user could copy the hashes and run brute force or dictionary attacks offline, systematically guessing passwords…

Security

Question

Why is /etc/shadow not world readable if the passwords are stored in an encrypted fashion?

Options

  • AThe encrypted passwords are still subject to brute force attacks.
  • BThis is just for historical reasons.
  • CThere is other information in the file that needs to be kept secret.
  • DThe passwords can be decrypted by anyone with root access.

How the community answered

(19 responses)
  • A
    74% (14)
  • B
    5% (1)
  • C
    11% (2)
  • D
    11% (2)

Explanation

Even though passwords in /etc/shadow are hashed (not encrypted), hashing is a one-way transformation - not decryption protection. If the file were world-readable, any user could copy the hashes and run brute force or dictionary attacks offline, systematically guessing passwords until a match is found. This is why A is correct: the hashing algorithm doesn't protect against an attacker who has unlimited time to guess.

Why the distractors are wrong:

  • B is wrong because the restriction isn't merely historical - it's an active, deliberate security control still critical today.
  • C is partially true (the file does contain aging/expiry metadata), but that's not the primary reason for the restriction; the real concern is password crackability.
  • D is wrong because root access legitimately allows reading the file - that's not a vulnerability, it's expected behavior; the threat is unprivileged users gaining access.

Memory tip: Think of a hash like a fingerprint - you can't reverse it, but if an attacker collects your fingerprint, they can compare it against a database of millions until they find a match. Hiding the file is like not leaving your fingerprints everywhere.

Topics

#password security#brute force attacks#file permissions#shadow file

Community Discussion

No community discussion yet for this question.

Full 102-500 Practice