Add and remove groups when for users

This commit is contained in:
Bob Mottram 2016-11-30 09:40:10 +00:00
parent e51e1a9ce2
commit c4de2e86d2
2 changed files with 2 additions and 0 deletions

View File

@ -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

View File

@ -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