Skip to main content
Question

How to update Login/Logout Hooks

  • July 21, 2016
  • 7 replies
  • 13 views

Forum|alt.badge.img+12

I would like to know by which mechanism are login and logout hooks updated? For instance, I have a script that I want run upon login. I had this scoped to myself as a test, and have since updated the script. The changes in the script are not applying to my machine after trying the following:
- ran a jamf recon
- ran a jamf manage
- ran a jamf policy
- ran a jamf createHooks

Is there something I'm missing?

7 replies

davidacland
Forum|alt.badge.img+18
  • Valued Contributor
  • July 21, 2016

The login / logout hooks don't change, they just call a script which runs any policies using the login and / or logout triggers. So they should be reading the script from the JSS.


Forum|alt.badge.img+16
  • Honored Contributor
  • July 21, 2016

Wrong post : )


mm2270
Forum|alt.badge.img+24
  • Legendary Contributor
  • July 21, 2016

Heh, never mind.


Forum|alt.badge.img+12
  • Author
  • Contributor
  • July 21, 2016

@davidacland this particular one runs a script that is also set to run offline... I failed to mention this, sorry.


mm2270
Forum|alt.badge.img+24
  • Legendary Contributor
  • July 21, 2016

Ah, you may be running into an issue where the offline cached script is getting called instead of downloading it from the server. I'd flush out the cached policy from the Mac. These get stored inside /Library/Application Support/JAMF/Offline Policies/ and will be inside a folder in that location with the name of the policy, so you may need to delete that entire policy name directory.
Note that the "Offline Policies" folder is a protected location, so you'll need root to even peek inside it.


Forum|alt.badge.img+12
  • Author
  • Contributor
  • July 21, 2016

@mm2270 Thanks dude... I think that will do the trick


davidacland
Forum|alt.badge.img+18
  • Valued Contributor
  • July 21, 2016

Hmm, not sure without testing. Some things that I suspect would refresh it:

  • Removing the computers from the scope of the policy, waiting for them to check-in, and then adding them back into scope. I would expect that they would remove the offline copies from the clients if they are no longer in scope.
  • Switching off the offline setting, waiting for clients to checkin and then re-enable it.

Bit of a pain either way though.