1

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?

Smile
  • 1,099
  • 1
    Usually, you can consult the man page for a command in these situations. In your case, you could have typed man passwd, then type /unlock and hit Enter in order to search for the word unlock in the man page. This leads directly to the option -u. – Stefan Hamcke Feb 03 '18 at 17:54

1 Answers1

5
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).

ale_tri
  • 166
  • 4