Login to Members Area

Choose the service you want to log in
24x7x365 Presence
Live Chat

Hosting Blog


Lock/unlock a Linux user account

There are times when we need to remove a user account that is not in use but sometime later we'll need that again and then we always think at that time that if we hadn't removed that account we could have used it.

So there is a good way in Linux by which we can make an account unusable until an administrator wants to make it usable again, i.e. we can lock the account.

We can lock a user account in Linux and then that account won't be accessible until the administrator unlocks it. Below is the process to do this.

To lock a user account, use the command below:-

passwd -l username

To unlock a user account, use the command below:-

passwd -u username

Sachin Friday 06 September 2013 - 8:21 pm | | Default

No comments

(optional field)
(optional field)

Comment moderation is enabled on this site. This means that your comment will not be visible until it has been approved by an editor.

Remember personal info?
Small print: All html tags except <b> and <i> will be removed from your comment. You can make links by just typing the url or mail-address.