From a705b5cdc35fc80c990a4da96259b4a09f925441 Mon Sep 17 00:00:00 2001 From: Naglfar Date: Fri, 13 Aug 2021 11:28:36 +0200 Subject: [PATCH] Fix remove user's home directory --- rmuser | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rmuser b/rmuser index 67ee517..feb0416 100755 --- a/rmuser +++ b/rmuser @@ -18,6 +18,7 @@ remove_user() echo "Deleting account from system..." sudo userdel $1 + sudo rm -rf /home/$1 echo "$1 user account is unenforced in ansible..." currdir=`pwd` @@ -35,7 +36,6 @@ bacup_user_data() { echo "Archiving home dir..." sudo tar cfz /root/backups/$1.tgz /home/$1 - sudo rm -rf /home/$1 } if [ -z $1 ]