Linux How to Disable a user account

To disable or lock a linux user account, run

passwd -l USERNAME_HERE

Or

usermod -L USERNAME_HERE

To verify if a user is locked, run

passwrd --status USERNAME_HERE

If account is disabled/locked, it will show L.

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *