Once in a while, we might want to lock a user from deployment. This section guides you on how to lock a user up.
Before locking the account, you want to make sure that the user account is unlocked at the first place.
To lock user, simply use the -L argument from usermod
command:
$ usermod -L <user>
Example, to lock james account:
$ usermod -L james
That's all for locking users.