Skip to main content
Question

Script using credentials fails via Self Service


Forum|alt.badge.img+11

I have a script to uninstall Zscaler that I want to run before upgrading an OS. When I run the script locally or via any policy not triggered by Self Service, it works. Even if I have a Self Service policy call a separate policy via a custom trigger. The Self Service policy doesn't apply the password and the GUI for the app comes up asking for the password instead.

#!/bin/sh

zspword=`echo 'passwordgoeshere' | base64 --decode`

/bin/launchctl unload /Library/LaunchDaemons/com.zscaler*

echo $zspword | sudo -S /bin/sh /Applications/Zscaler/.Uninstaller.sh

PIDS=`ps cax | grep "Zscaler" | grep -o '^[ ]*[0-9]*'`
if [ -z "$PIDS" ]; then
  echo "Process not running." 1>&2
else
kill -9 $PIDS
fi

exit 0

0 replies

Be the first to reply!

Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings