Saturday, July 11, 2009

How to Lock / Unlock User in ubuntu / Debian Linux

For Locking User from command Line

$ sudo usermod -L varkala This will Lock user account named varkala

For Locking User from command Line

$ sudo usermod -U varkala This will UnLock user account named varkala

3 comments:

Anonymous said...

Just a note. The both command explanation says Lock when the secon must be Unlock

Anonymous said...

Also, to add to the previous comment, your post doesn't really explain what exactly Locking and UnLocking a User does or means.

Anonymous said...

if a user is locked, you cannot login via ssh for example.