Append groups when doing ensure-groups

This commit is contained in:
Chaitanya Talnikar
2022-10-01 09:30:55 -04:00
parent b21607c4b5
commit 5d0ce361ce

View File

@@ -39,7 +39,7 @@ groups=$(join_by "," "${!group_map[@]}")
if [ "$groups" != "" ]; then
echo "Adding user '${USER}' to groups: $groups"
usermod -G $groups ${USER}
usermod -a -G $groups ${USER}
else
echo "Not modifying user groups ($groups)"
fi