macOS 10.15.3 LoginHook

Jul
New Contributor III

Is anyone else experiencing issues where it seems like login hooks are not occurring with Catalina 10.15.3 ? We're in JAMF 10.19 and it works fine on mac with 10.15.1.

Is there a way to create a launch Agent who works like the "Once per user per computer" trigger?

Thank you for your help.

8 REPLIES 8

Hugonaut
Valued Contributor II

@Jul "Is there a way to create a launch Agent who works like the "Once per user per computer" trigger?"

Without knowing what you're doing exactly..
First thought that comes to my mind is to deploy a LaunchAgent & Script(s) that calls on said script(s) that performs the login action you need & then writes out a complete message to a hidden file . The hidden file would be checked in the beginning to determine if it needs to run the script or not.

Example, Launch Agent Runs, calls on script, script runs check for a hidden file in the users home folder. Script does not see hidden file, Runs & Performs Action on Users Profile. Writes out to a hidden file that action is complete - next time user logs in it checks & doesn't run, etc.

Curious to see what other solutions are conjured up.

________________
Looking for a Jamf Managed Service Provider? Look no further than Rocketman
________________


Virtual MacAdmins Monthly Meetup - First Friday, Every Month

Jul
New Contributor III

Hi @Hugonaut ,
Thank you, it seems a little bit tricky but I will try in that way. I am interested if there is a more simple solution directly with the LaunchAgent parameters.
I just try to convert my policies with Login Hook trigger, because it seems to doesn't work with the last catalina update, and I see on many blog post that login hooks are deprecated technology... I have converted all these policies with launch agent, but I have just one with the "Once per user per computer" trigger that I cannot apply with Launch Agent.

Hugonaut
Valued Contributor II

@Jul To the best of my knowledge the solution you are seeking would be something along the lines of my post, a multi-step process regarding a log file somewhere keeping track of what users have or have not performed the action, whether its locally or an extension attribute written out to jamf & then checked against jamf, etc & a script or scripts that performs the action, either within the launch agent itself or initiated by the launch agent. I emphasize to the best of my knowledge because somebody may come up with an alternate solution & hopefully it's a simpler solution.

________________
Looking for a Jamf Managed Service Provider? Look no further than Rocketman
________________


Virtual MacAdmins Monthly Meetup - First Friday, Every Month

Jul
New Contributor III

Hi @Hugonaut ;
Tricky, but it works fine for me! Thank you!
I'm just curious if other have the same problems with catalina 10.15.3 (no login/logout hooks works) JAMF 10.19?
It worked fine until 10.15.1... It is a bug or a real new thing?

kerouak
Valued Contributor

Apple are deprecating Login / Logout hooks.
That's probably why they are non functioning/ semi functioning.
If you not comfortable with launchdaemons and packages / scripts etc, here's a link that simplifies it for you.
https://github.com/ryangball/launchd-package-creator

G'LUCK!

Jul
New Contributor III

Thank you for the link! I am migrating my login script to lauchndaemons :)

howardgmac
New Contributor III

You might also look at using Outset to get what you need done.

Jul
New Contributor III

Wow nice, thank you @howardgmac !

Thank you all for your help!