Before you remove an account from a system, is a good idea lock it for one week to make sure that no one use it.
To lock, you can use the Below command:
#passwd -l username (where username is the login id).
After that, if someone try to login using this account, the system will return:
# su - username
This account is currently not available.
To Unlock the same account
Following command re-enables an account by changing the password back to its previous value i.e. to value before using -l option.
#passwd -u username
For any query please feel free to contact me my email id is sashwatkatore@gmail.com.
To lock, you can use the Below command:
#passwd -l username (where username is the login id).
This option is used to lock the specified account and it is available to root only. The locking is performed by rendering the encrypted password into an invalid string.
After that, if someone try to login using this account, the system will return:
# su - username
This account is currently not available.
To Unlock the same account
Following command re-enables an account by changing the password back to its previous value i.e. to value before using -l option.
#passwd -u username
For any query please feel free to contact me my email id is sashwatkatore@gmail.com.
No comments:
Post a Comment