mirror of
https://github.com/ThunixdotNet/makeuser.git
synced 2026-01-24 05:30:18 +00:00
Adding some more to rmuser
This commit is contained in:
11
rmuser
11
rmuser
@@ -1,5 +1,14 @@
|
||||
#!/bin/bash
|
||||
echo "This will remove user account $1 from Thunix."
|
||||
echo "It is assumed the user account has been un-enforced in Ansible as well."
|
||||
|
||||
sudo pkill -U $1
|
||||
echo "Killing user processes..."
|
||||
sudo pkill -9 -U $1
|
||||
|
||||
echo "Arching home dir..."
|
||||
sudo tar cfz /home/$1.tgz /home/$1
|
||||
|
||||
echo "Deleting account from system..."
|
||||
sudo userdel $1
|
||||
|
||||
sudo mail -s "User Account $1 removed from Thunix" root@thunix.net
|
||||
|
||||
Reference in New Issue
Block a user