Script to update ARD 3.9 at checkin - works with manual jams policy but not otherwise

lynnaj
New Contributor III

I am new to running scripts with JAMF so I am sure I am missing something about the following:

I created this is the script to both update the ARD client to 3.9 and restart the agent:

#!/bin/sh softwareupdate -i 'RemoteDesktopClient-3.9.0' /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -restart -agent exit 0

I sat a policy to run this script once per computer at recurring check-in. This script works great if you log into the target computer and manually run:

sudo jamf policy

Which, as I understand it, forces the recurring check-in.

However, the script reports an error with "no such update" found if run at the random (i.e. normal) computer check-in with no one logged in. On a computer that fails you can login and run softwareupdate -l and see that the update does in fact exist for that computer and as I say you can run the script successfully by then just running the jamf policy command.

Therefore, I assume that something is amiss with the user that the jamf agent is using to run this script when no user is logged in. I've tried to find settings for running this as "root" and/or running the script with no user logged in but, if they exist, I am completely missing those settings.

I'm running JSS version 9.97.1482356336 and targeting Mac OS clients running 10.11.6.

Does anyone have any ideas what I am doing wrong?

Thanks!
- Lynna Jackson, Williams College

1 REPLY 1

SGill
Contributor III

I discovered yesterday that Apple set the "User Context" flag on this package for "Logged-In" user instead of the more common "System User" installation context. If JAMF supports changing that in your console (sorry I don't have JAMF currently) you can update the "User Context" flag to System User and you will then be able to install this particular package at the Login screen instead, via your script.