From c4de2e86d268639c25cb846537ec1407fee1169d Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Wed, 30 Nov 2016 09:40:10 +0000 Subject: [PATCH] Add and remove groups when for users --- src/freedombone-adduser | 1 + src/freedombone-rmuser | 1 + 2 files changed, 2 insertions(+) diff --git a/src/freedombone-adduser b/src/freedombone-adduser index 56ad1d16..7c082b8c 100755 --- a/src/freedombone-adduser +++ b/src/freedombone-adduser @@ -79,6 +79,7 @@ chmod 600 /etc/shadow chmod 600 /etc/gshadow useradd -m -p "$NEW_USER_PASSWORD" -s /bin/bash $ADD_USERNAME adduser $ADD_USERNAME sasl +groupadd $ADD_USERNAME chmod 0000 /etc/shadow chmod 0000 /etc/gshadow diff --git a/src/freedombone-rmuser b/src/freedombone-rmuser index 6f419812..d5123696 100755 --- a/src/freedombone-rmuser +++ b/src/freedombone-rmuser @@ -139,6 +139,7 @@ done chmod 600 /etc/shadow chmod 600 /etc/gshadow userdel -r $REMOVE_USERNAME +groupdel $REMOVE_USERNAME chmod 0000 /etc/shadow chmod 0000 /etc/gshadow