Locking an Account

Prevent a user account from signing into the system.

To lock a user's account, use the passwd -l command:

sudo passwd -l username

To unlock the account, use the passwd -u command:

sudo passwd -u username

For more information, see the passwd(1) manual page.