Monterey 12.3 and DEPnotify issue

jschank
Contributor

Is anyone having issues with their DEPnotify script on devices that have the latest macOS Monterey 12.3?  Our script is not working on devices with version 12.3.  If I roll back to version 12.2.1 the DEPnotify script works fine.

4 REPLIES 4

Corey_Nechkash
New Contributor III

Double check the DEPNotify script and make sure you don't have any "python" calls in there. Machines with macOS 12.3 installed do not have python installed by default anymore.

You're probably seeing the same issue that was pointed out in this post:
https://community.jamf.com/t5/jamf-pro/dep-notify-and-monterey-12-2-3-python-call/m-p/258525

You should be able to change the command used to pull the username to something that doesn't require python and then the rest of the script should run just fine. 

ajamfadmin1810
Contributor

Just to add to this I used the script at this link https://github.com/jamfprofessionalservices/DEP-Notify and it does not have any python calls in it. 

Donald56
New Contributor

I really appreciated this piece. I often think of how much of a time suck and a mental drain diving into comment conversations can be. But sometimes it is worth it. At the end of the day, it's important to assert oneself and to attempt to have discussions about what matters to you.

 

GarageBand App

James_h
New Contributor II
Not sure if you are still having trouble with this but for us it was an issue with 12.3 monterey in which Apple stopped including python 2. The DEPNotify script most of us use from Github has a python line in it. For us it was around line 521. This will vary for everyone as this section is after the array section. The section this is in is in the "Core Script Logic -Don't change without major testing" Section of the script. It is the part that grabs the logged in users name. Here is what is there currently:
CURRENT_USER=$(/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");') echo "$(date "+%a %h %d %H:%M:%S"): Current user set to $CURRENT_USER."
Locate this section in your DEPNotify script from GitHub and replace it with this line.
CURRENT_USER=$(echo "show State:/Users/ConsoleUser" | scutil | awk '/Name :/ && ! /loginwindow/ { print $3 }') echo "$(date "+%a %h %d %H:%M:%S"): Current user set to $CURRENT_USER."