This repository was archived by the owner on Nov 8, 2021. It is now read-only.

Description
script will exit after execute /usr/bin/pkill which cause users won't delete after added
function delete_local_user() {
# First, make sure no new sessions can be started
/usr/sbin/usermod -L -s /sbin/nologin "${1}"
# ask nicely and give them some time to shutdown
/usr/bin/pkill -15 -u "${1}"
sleep 5
# Dont want to close nicely? DIE!
/usr/bin/pkill -9 -u "${1}"
sleep 1
# Remove account now that all processes for the user are gone
/usr/sbin/userdel -f -r "${1}"
}