After several failed login attempts, the account for user alex is locked. The entry in /etc/shadow for alex begins with an exclamation mark before the hashed password. Which step enables alex to authenticate again?
The passwd -u command removes the lock flag placed on the password field, reversing the effect of the exclamation mark in /etc/shadow. The usermod -L option actually locks an account, which is the opposite of the needed action. Running chage -E -1 adjusts the expiration date but leaves the lock flag intact, so login remains blocked. While editing /etc/shadow with sed could remove the mark, manual edits risk syntax errors and security gaps compared to the built-in passwd utility.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What does the exclamation mark in /etc/shadow signify?
Open an interactive chat with Bash
Why is passwd -u preferred over manually editing /etc/shadow?
Open an interactive chat with Bash
What is the difference between the passwd -u and usermod -L commands?