So i've been working on this script for a little over a year lol. I can't get it to work quite right and was hoping someone might have more experience. The script will take the user cert that was deployed to the machine via config profile SCEP and assign it to the identity for our Wireless. The part that doesn't work when ran from JAMF is the following:
echo "Setting Identity to user $currentUser cert"
sudo -u "$currentUser" -i /usr/bin/security set-identity-preference -s com.apple.network.eap.user.identity.wlan.ssid.Earth -c "$currentUser" /Library/Keychains/System.keychain
also tried as this:
su -l "$currentUser" -c '/usr/bin/security set-identity-preference -v -s com.apple.network.eap.user.identity.wlan.ssid.Earth -c "'"$currentUser"'" /Library/Keychains/System.keychain'
This script works great when ran locally as both myself and when I run it from root. IE sudo -s
Why doesn't it work the same when ran as a script from JAMF, or as a script that is copied to the machine and than ran using the process option.
When JAMF logs in as root is it restricted to what it can do?
