Closed stickman112 closed 5 years ago
Looks like you are calling yo as root. This should be called directly as the end user who is logged into the GUI or via yo_scheduler as root.
Ahh, thanks @sphen13 ... that did it. Appreciate your help!
@stickman112 please share your code
I did the following and still failing
sudo -u $currentUser /Applications/Yo.app/.....
here is a sample that i have
consoleUser=$(/usr/bin/python -c 'from SystemConfiguration import SCDynamicStoreCopyConsoleUser; import sys; username = (SCDynamicStoreCopyConsoleUser(None, None, None) or [None])[0]; username = [username,""][username in [u"loginwindow", None, u""]]; sys.stdout.write(username + "\n");')
consoleUserUID=$(/usr/bin/id -u "${consoleUser}")
launchctl asuser "$consoleUserUID" "$notificationAgent" -z Tink -t "$notificationTitle" -n "Updates have been due for $oldestUpdateDays days, Please Update Now" -b "Update Now" -o "Later" -a munki://updates > /dev/null 2>&1
Failed to get user context: 1: Operation not permitte
when using currentUser=$(stat -f%Su /dev/console) launchctl asuser "$currentUser"
please see code above - the launchctl command require a uid not a name - you are supplying a name. This is not a yo issue.
Ok thanks will fix that thanks
Trying to identify what could potentially be causing the below message when using SSH to run a notification. The notifier works fine when its run locally, VNC session, and Self-Service(JAMF MDM Store).
Have tried everything I can think of, but not sure whats going on. Is it possible this is permissions based? Tried changing it to a few different things but the result is the same. Any help appreciated!