diff --git a/packer/ansible/roles/windowmanager/files/guest-account.sh b/packer/ansible/roles/windowmanager/files/guest-account.sh index 968fa5c..bedde26 100644 --- a/packer/ansible/roles/windowmanager/files/guest-account.sh +++ b/packer/ansible/roles/windowmanager/files/guest-account.sh @@ -23,7 +23,7 @@ fi # read list of supplementary groups of the guest account from file if [ -f /etc/guest-account/groups ]; then - GROUPS="$(cat /etc/guest-account/groups)" + GROUPS="$(awk '{ if (NR==1) printf "%s", $0; else printf ",%s", $0; } END { print "" }' /etc/guest-account/groups)" fi is_system_user ()