Merge pull request #7 from chaitan3/fix_groups

Append groups when doing ensure-groups
This commit is contained in:
Josh Sunnex
2022-10-02 12:52:19 +13:00
committed by GitHub

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