When running a script for 802.1x wifi configuration through Self Service, the following works perfectly. If I push it from a policy, the certificate doesn't get assigned to the com.apple.network.eap.user.identity.wlan.ssid identity in keychain.
Is there a difference in how the JSS distributes the script through self service vs pushing via policy?
If I run it through "sudo jamf policy" as the logged in user, it'll also work. Just seems to be when the policy kicks off on its' own is when it's not working.
#!/bin/sh
security set-identity-preference -n -s "com.apple.network.eap.user.identity.wlan.ssid.LC-SSID"
security set-identity-preference -c "$Cert" -s "com.apple.network.eap.user.identity.wlan.ssid.LC-SSID" /Users/$currUser/Library/Keychains/login.keychain /Library/Keychains/System.keychain