nerdexam
GIAC

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.

Linux and Cryptography

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)
  • A
    10% (3)
  • B
    3% (1)
  • C
    83% (24)
  • D
    3% (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.

A/etc/passwd

/etc/passwd still exists but with shadow enabled its password field contains only 'x', not the actual hash.

B/usr/shadow

/usr/shadow is not a recognized or valid path in the Linux Filesystem Hierarchy Standard.

C/etc/shadowCorrect

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.

D/usr/passwd

/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

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

Community Discussion

No community discussion yet for this question.

Full GSEC Practice