Hey All,
I'm trying to script the Apple ID preference pane to open and have a command that works on the standard logged in user in terminal and in the past when I had gotten this, it was because the script was still trying to run as root, however I'm telling it to run as the logged in user and IM getting the above error "LSOpenURLsWithRole() failed with error -54 for the URL x-apple.systempreferences:AppleIDPrefPane"
Below is the script, if anyone has a suggestion.
#!/bin/sh
currentUser=$(/bin/ls -l /dev/console | /usr/bin/awk '{print $3}')
sudo -u $currentUser open "x-apple.systempreferences:AppleIDPrefPane"
#sleep 150
#jamf recon
exit 0
Gabe Shackney
Princeton Public Schools