Posted on 02-18-2025 04:53 AM
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.
Posted on 02-18-2025 05:35 AM
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
Posted on 02-18-2025 06:05 AM
"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.
Posted on 02-18-2025 05:41 AM
Two things come to mind: