220-1102 Question 270
Single answer/etc/shadowA Linux workstation user reports that they cannot log in after a recent account update. You verify that the username exists in /etc/passwd and then inspect the corresponding entry in /etc/shadow. The password field for the user begins with an exclamation point (!). What is the MOST likely explanation for the login problem?
- A
The account's password has been locked, preventing password-based login for that user
- B
The password has expired and the user must change it at the next login
- C
The account has been deleted but /etc/passwd was not updated
- D
The system has switched to storing clear-text passwords in /etc/shadow
Show answer and explanation
Correct answer: A
Explanation
The best answer is that the password has been locked. On Linux systems, /etc/shadow stores encrypted password hashes and account aging data. A leading ! in the password field commonly indicates that the password is locked, often by administrative tools such as passwd -l. This prevents password-based authentication while leaving the account entry intact. By contrast, password expiration is handled through the aging fields in /etc/shadow and can be reviewed with tools such as chage. This aligns with standard Linux account administration practices documented in man pages for shadow, passwd, and chage.
- A. Correct.
Correct. In Linux, /etc/shadow stores password hashes and related account aging information. If the password field begins with !, the password is typically locked, which disables password authentication for that account. This is a common result of administrative actions such as using passwd -l. The account may still exist, but password-based logins are blocked.
- B. Incorrect.
Incorrect. Password expiration is usually controlled by the aging fields in /etc/shadow, such as the last password change date, maximum age, and warning period. An expired password does not typically appear as a leading ! in the password hash field. A candidate might choose this because both issues can prevent normal login, but they are represented differently.
- C. Incorrect.
Incorrect. If the account had been deleted, the corresponding /etc/passwd entry would generally not remain as a valid active user account entry. The presence of a matching /etc/passwd entry and a /etc/shadow record with a leading ! indicates a locked password, not a deleted account. This distractor reflects confusion between account management files.
- D. Incorrect.
Incorrect. /etc/shadow is specifically used to store protected password hashes, not clear-text passwords. A leading ! does not indicate a storage format change. This option is implausible from a security standpoint and contradicts standard Linux authentication practices.