How To Disable or Lock Linux User Account?

RSS
EMAIL
FACEBOOK
FACEBOOK
GOOGLE
GOOGLE
https://www.poftut.com/disable-lock-linux-user-account/
PINTEREST
PINTEREST
INSTAGRAM

How can I disable some linux account? By disabling it I do not want to remove the account and related files. Just user related operations will be prevented. If an user authentication occures it will be not authenticated. We will use usermod command to lock user account.

Disable User Account

We will disable account with the following code.

  • usermod will change user account related attributes and information.
  • -L will lock given account and put ! in the user passwords database before encrypted password.
  • -e 1 will set expire date from 1/1/1970

Check Configuration

We will check the status of this account from configuration file. Is the account disabled?

There is an other way to check Configraution

RSS
EMAIL
FACEBOOK
FACEBOOK
GOOGLE
GOOGLE
https://www.poftut.com/disable-lock-linux-user-account/
PINTEREST
PINTEREST
INSTAGRAM

LEARN MORE  How To Allow Normal User Run Commands As Root In Linux?

You may also like...

Leave a Reply

Your email address will not be published.

Enjoy this blog? Please spread the word :)