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 is the /etc/shadow file?
Open an interactive chat with Bash
What does the 'passwd -u' command do?
Open an interactive chat with Bash
What are the risks of manually editing the /etc/shadow file?