nerdexam
Linux_Foundation

LFCS · Question #72

Which file contains the date of the last change of a user's password?

The correct answer is D. /etc/shadow. The /etc/shadow file contains encrypted user password information, including the date of the last password change.

Submitted by fernanda_arg· Apr 18, 2026User and Group Management

Question

Which file contains the date of the last change of a user's password?

Options

  • A/etc/gshadow
  • B/etc/passwd
  • C/etc/pwdlog
  • D/etc/shadow
  • E/var/log/shadow

How the community answered

(26 responses)
  • A
    8% (2)
  • B
    4% (1)
  • C
    4% (1)
  • D
    85% (22)

Why each option

The /etc/shadow file contains encrypted user password information, including the date of the last password change.

A/etc/gshadow

/etc/gshadow stores encrypted group password information and secure group attributes, not user password change dates.

B/etc/passwd

/etc/passwd contains basic user account information like username, UID, GID, home directory, and shell, but not the password hash or last change date for security reasons.

C/etc/pwdlog

/etc/pwdlog is not a standard file for storing password change dates on Linux systems.

D/etc/shadowCorrect

The /etc/shadow file stores secure user account information, including the encrypted password, password expiration policy, and the date (in days since epoch) of the last password change.

E/var/log/shadow

/var/log/shadow is not a standard file; /etc/shadow is the correct path for password hashes and associated dates.

Concept tested: User password aging information location

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

Topics

#user management#password management#system files#security files

Community Discussion

No community discussion yet for this question.

Full LFCS Practice