Fixed up rmuser

This commit is contained in:
Ubergeek 2019-06-15 16:48:37 +00:00
parent 703152887c
commit cbcb6d2e0e
1 changed files with 3 additions and 2 deletions

5
rmuser
View File

@ -5,10 +5,11 @@ echo "It is assumed the user account has been un-enforced in Ansible as well."
echo "Killing user processes..."
sudo pkill -9 -U $1
echo "Arching home dir..."
echo "Archiving home dir..."
sudo tar cfz /home/$1.tgz /home/$1
sudo rm -rf /home/$1
echo "Deleting account from system..."
sudo userdel $1
sudo mail -s "User Account $1 removed from Thunix" root@thunix.net
echo "User $1 removed from system. Make sure user is unenforced in ansible." | sudo mail -s "User Account $1 removed from Thunix" root@thunix.net