LX0-104 · 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 stores sensitive user account information, including encrypted passwords, password expiration policies, and the date of the last password change. This file is secured with restrictive permissions, typically accessible only by the root user, for enhanced…
Question
Options
- A/etc/gshadow
- B/etc/passwd
- C/etc/pwdlog
- D/etc/shadow
- E/var/log/shadow
How the community answered
(53 responses)- A6% (3)
- B2% (1)
- C4% (2)
- D87% (46)
- E2% (1)
Why each option
The /etc/shadow file stores sensitive user account information, including encrypted passwords, password expiration policies, and the date of the last password change. This file is secured with restrictive permissions, typically accessible only by the root user, for enhanced security.
/etc/gshadow stores encrypted group passwords and group administration information, not user password change dates.
/etc/passwd stores basic user account information like username, UID, GID, home directory, and shell, but does not contain password hashes or last change dates for security reasons (these were moved to /etc/shadow).
/etc/pwdlog is not a standard file for storing password change dates.
The /etc/shadow file contains securely stored hashed passwords and password aging information, including the date of the last password change. This date is represented as the number of days since January 1, 1970, for each user account.
/var/log/shadow is not the correct location; logs are typically kept in /var/log, but the shadow file itself is in /etc.
Concept tested: User password security files
Source: https://linux.die.net/man/5/shadow
Topics
Community Discussion
No community discussion yet for this question.