Posted on 07-07-2022 01:37 PM
Hello all,
When a new user account is created in the process of a new user signing into a Mac via Jamf Connect for the first time, I'd like it to trigger a policy in Jamf to set the dock layout.
Anyone have an idea of how to have a new user account trigger this? I am already supposing that in policy I would set trigger as a custom event.
Thanks
Solved! Go to Solution.
07-09-2022 11:14 AM - edited 07-09-2022 11:18 AM
I use Outset for this purpose. It requires installing your own version of python first, I recommend the MacAdmins Python referenced on outset’s GitHub page.
Outset is great for login scripts, it has folders for login-once and login-every in the user context, and login-once-privileged to run the script as root. I would create a simple script and put it in login-once-privileged to call your Jamf policy to set the dock, as it would only run once when a new user is created.
#!/bin/sh
/usr/local/bin/jamf policy -event docktrigger
Posted on 07-08-2022 11:39 AM
I cannot think of a clean way to do it. You could have extension attributes monitoring for changes to the /users directory, but that would be very sloppy and would have a delay. I would say you may want to submit a feature request for this.
07-09-2022 11:14 AM - edited 07-09-2022 11:18 AM
I use Outset for this purpose. It requires installing your own version of python first, I recommend the MacAdmins Python referenced on outset’s GitHub page.
Outset is great for login scripts, it has folders for login-once and login-every in the user context, and login-once-privileged to run the script as root. I would create a simple script and put it in login-once-privileged to call your Jamf policy to set the dock, as it would only run once when a new user is created.
#!/bin/sh
/usr/local/bin/jamf policy -event docktrigger
Posted on 07-11-2022 09:43 AM
Thank you @jbisgett! This solution worked well for me.