To lock a Linux User account, run
usermod -L USER_NAME_HERE
You can verify the account is locked with command
passwd --status USER_NAME_HERE
Example

See usermod
Written by
To lock a Linux User account, run
usermod -L USER_NAME_HERE
You can verify the account is locked with command
passwd --status USER_NAME_HERE
Example

See usermod
Leave a Reply