Skip to main content
Solved

New User Trigger

  • July 7, 2022
  • 3 replies
  • 16 views

Forum|alt.badge.img+7

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

Best answer by jbisgett

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

 

 

3 replies

AJPinto
Forum|alt.badge.img+26
  • Legendary Contributor
  • 2802 replies
  • July 8, 2022

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
Forum|alt.badge.img+12
  • Honored Contributor
  • 107 replies
  • Answer
  • July 9, 2022

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

 

 


Forum|alt.badge.img+7
  • Author
  • Contributor
  • 125 replies
  • July 11, 2022

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.