I locked the passwd for a user by using the command,
sudo passwd -l [user]
Then, how do I unlock the passwd for this user?
sudo passwd -u [username]
from man passwd
:
-u, --unlock Unlock the password of the named account. This option re-enables a password by changing the password back to its previous value (to the value before using the -l option).
man passwd
, then type/unlock
and hit Enter in order to search for the wordunlock
in the man page. This leads directly to the option-u
.