Showing posts with label lock-unlock user account in linux. Show all posts
Showing posts with label lock-unlock user account in linux. Show all posts

Wednesday, May 1, 2013

Lock & Unlock a User Account in Linux


To Lock a user account 
$ sudo passwd -l username

To UnLock a user account
$ sudo passwd -u username

Root can log into locked account using su - username but can't log in using ssh.
Other users can't log into locked account using su - username as well as ssh.

The message is displayed when users try to access the locked account.
su: Authentication failure