Skip to main content
Question

How to run "sudo" demanding commands in Jamf script

  • September 29, 2020
  • 1 reply
  • 19 views

Forum|alt.badge.img+3

I have a command which i would like to run on multiple endpoints
The problem is that it must be run as "sudo" which requires entering the computer's admin user password.
When trying to run a script as such i get the error: "line 3: ./: is a directory" &
Error running script: return code was 126

The script tries to call a software uninstallation run script which is on every endpoint.
Any ideas on how do bypass using Jamf the need for entering Admin password/ solving the current error it is showing?

1 reply

mm2270
Forum|alt.badge.img+24
  • Legendary Contributor
  • September 29, 2020

All scripts run from jamf run as root. I'm not sure why there would be an issue with your script given this. Maybe you can provide a few more details on what's included in the script that may be causing a problem.