How to run "sudo" demanding commands in Jamf script

New Contributor II

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?


Legendary Contributor II

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.