User Template Tweaks - Mojave

MBrownUoG
Contributor

Hello folks.

I know I'm late to the party on this one, but as I'm going through my summer packaging at the moment, I noticed that a few of the tweaks we used to apply to the user template (copying in license information files for the most part), are no longer working. I can place content into the user template directory, but this does not get copied to any profiles that are created on the machines.

I can see from the threads here that this is just the direction Apple is going now. My question is which method is best to get around this issue? Folks have recommended using /Library/LaunchAgents but I have no experience in that area at all... and I was wondering if there are any advantages to going that route as opposed to using a script tied to a Login Hook via Jamf?

As a quick follow-up, is there any way to prioritise which operations run first via the Jamf Login Hooks? If I can cache the license files on the machine and have them copied over to the user profile as the first operation on logging in, that solves the problem neatly.

Cheers in advance for any guidance!

4 REPLIES 4

dsavageED
Contributor III

The use template really shouldn't be used anymore, it's a legacy kludge... The main reason it shouldn't be used is this; Apple own everything inside /System and it is entirely their right to lock that down with System Integrity Protection (SIP) as it provides a securer experience. Outside of that using configuration profiles for preferences is preferable and other configuration like fonts, or files in Application support can be written into the user on login using a LaunchAgent.

The login hooks (also deprecated) will run in an alphabetical order, so you could just number them; 01-my-first-script, 02-my-second-script etc. LaunchAgents run as the user, LaunchDaemons run as root, they are recommended because they are the modern way to achieve a similar result to login scripts.

MBrownUoG
Contributor

Thank you for this, good info! I'll try the alphabetical order approach to get us up and runnning for the start of term, then look at LaunchDaemons and LaunchAgents to convert everything by next summer.

Is there a good beginners guide I can follow anywhere to get started with them, or any decent examples kicking around?

dsavageED
Contributor III

You might want to have a look at https://github.com/chilcote/outset

PaulHazelden
Valued Contributor

LaunchAgents are all launched together and the system lets them get on with it, so you may find they run in slightly different orders on login. LaunchDaemons are also launched together. This makes them hard to determine an order.
There are probably a load of LaunchAgents here in Jamf Nation for you to look at. You can also ask here, there are a lot who will help if they can.