Script deployment to Mac gets stuck on "Installed" and doesn't execute

pcd12345
New Contributor

I have a script that I wish to use to remove old user accounts on Macs that have no activity after a specific date. I have ran this script manually on various Macs that we have with no issues, however when I try running it via Jamf, it gets stuck on "Installed" for the status and never executes. Even when I run a simple "echo "test"" script, this results in the same issue, so it seems that I am unable to run any scripts at all. If I go to "Result of script execution" it says "Could not load any current execution, we will try again soon...". This has been going on for maybe several months now, if anyone has any ideas on how to resolve this, it would be much appreciated. 

3 REPLIES 3

mschlosser
Contributor II

One of the things that is different in this context is the user which is running the script; when running locally the script would be running as the console user; when running from jamf, you would be running it as root; which could lead to different results depending on what exactly the script was doing.

Best to always get the current user and run any commands as them,  hope that helps

"echo "test"" should work as Root though, but this too gets stuck on "Installed". If even that fails, then it wouldn't be possible for me to try running the script as a different user, since I would need to use echo to get the current logged in user.

AJPinto
Esteemed Contributor

Two things come to mind:

  1. You should be reprovisioning computers between users unless this is some kind of lab situation. However even in a lab you should reprovision the computers every year or so, over summer sesmester for example.
  2. You cannot use a script to delete accounts with Secure Tokens, verify Secure Token status on the accounts. If they have Secure Tokens that is your problem.