forked from team/makeuser
Fixed up rmuser
This commit is contained in:
parent
703152887c
commit
cbcb6d2e0e
5
rmuser
5
rmuser
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue