From f572fd62f06fa346ea9e4005a177ab1832b43c38 Mon Sep 17 00:00:00 2001 From: jalr Date: Tue, 23 Oct 2018 00:00:54 +0200 Subject: [PATCH] Fix guest-account script breaking if guest is in more than one group --- packer/ansible/roles/windowmanager/files/guest-account.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 ()