BradleyA / Linux-admin

Shell scripts to automate download of GitHub traffic statistics, cluster administration, and create an animated GIF.
MIT License
29 stars 6 forks source link

cluster-command.sh - disable/enable user login account #21

Closed BradleyA closed 5 years ago

BradleyA commented 5 years ago

cluster-command.sh - disable/enable user login account - disable user account system access not allowing user to login or other user access to user files below ~/.docker ~/.ssh

BradleyA commented 5 years ago

try this solution found online Let the account expire to disallowing a user from logging in from any source including ssh:

# disallow peter from logging in
sudo usermod --expiredate 1 peter

This is how you can reenable that account:

# set expiration date of peter to Never
sudo usermod --expiredate "" peter