Add and remove groups when for users
This commit is contained in:
parent
e51e1a9ce2
commit
c4de2e86d2
|
@ -79,6 +79,7 @@ chmod 600 /etc/shadow
|
||||||
chmod 600 /etc/gshadow
|
chmod 600 /etc/gshadow
|
||||||
useradd -m -p "$NEW_USER_PASSWORD" -s /bin/bash $ADD_USERNAME
|
useradd -m -p "$NEW_USER_PASSWORD" -s /bin/bash $ADD_USERNAME
|
||||||
adduser $ADD_USERNAME sasl
|
adduser $ADD_USERNAME sasl
|
||||||
|
groupadd $ADD_USERNAME
|
||||||
chmod 0000 /etc/shadow
|
chmod 0000 /etc/shadow
|
||||||
chmod 0000 /etc/gshadow
|
chmod 0000 /etc/gshadow
|
||||||
|
|
||||||
|
|
|
@ -139,6 +139,7 @@ done
|
||||||
chmod 600 /etc/shadow
|
chmod 600 /etc/shadow
|
||||||
chmod 600 /etc/gshadow
|
chmod 600 /etc/gshadow
|
||||||
userdel -r $REMOVE_USERNAME
|
userdel -r $REMOVE_USERNAME
|
||||||
|
groupdel $REMOVE_USERNAME
|
||||||
chmod 0000 /etc/shadow
|
chmod 0000 /etc/shadow
|
||||||
chmod 0000 /etc/gshadow
|
chmod 0000 /etc/gshadow
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue