New User Trigger

dtmille2
Contributor III

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

1 ACCEPTED SOLUTION

jbisgett
Contributor II

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

 

 

View solution in original post

3 REPLIES 3

AJPinto
Valued Contributor

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.

jbisgett
Contributor II

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

 

 

Thank you @jbisgett! This solution worked well for me.