Ubuntu – Can I automatically add a guest user (guest-session) to a user group? How to do it)

groupsguest-sessionpermissionsuser-managementusers

I need guest users to be in a specific user group. I probably could create a new guest-account and add it to the group. But I'd rather like to use the existing guest-session-option integrated in Ubuntu (16.04). Is there any way to do it? I only found ways to automaticaly launch scripts/programs or costumize the startup-dialog.
Thank you very much in advance!

Best Answer

Yes. To make the guest users belong to mygroup, create /etc/guest-session/prefs.sh and add the line:

adduser $USER mygroup