MAC OS Ventura - Standard users unable to forget old wifi networks

New Contributor

For Mac OS ventura it seems like the old PLIST to edit wifi settings is no longer a thing. 

I keep getting prompted to input an admin password when I want to remove wifi profiles as a standard user. 



Honored Contributor II

I have not needed to try this script, but I sniped it years ago incase I ever needed it. Maybe this will help. It should give standard users the ability to modify wi-fi settings, and printer settings because why not nest unrelated things.



# Allows non-admin users to add printers and manage their WiFi configuration.

#For WiFi

/usr/bin/security authorizationdb write allow
/usr/bin/security authorizationdb write allow

#For printing

/usr/bin/security authorizationdb write system.preferences.printing allow
/usr/bin/security authorizationdb write system.print.operator allow
/usr/sbin/dseditgroup -o edit -n /Local/Default -a everyone -t group lpadmin
/usr/sbin/dseditgroup -o edit -n /Local/Default -a everyone -t group _lpadmin

exit 0;


Hi @AJPinto 

Other than WiFi and Printing, do you also use/edit authorizationdb to allow other things? (such as software update?)

New Contributor III

This doesn't seem to work anymore...

Contributor II

Ran this together for our own Organisation.

# Pulls the current logged in user and their UID
currUser=$(ls -l /dev/console | awk '{print $3}')
currUserUID=$(id -u "$currUser")

/bin/launchctl asuser "$currUserUID" sudo -iu "$currUser" /usr/bin/osascript > /dev/null << APPLESCRIPT

display dialog "Enter name of the Wi-Fi access point you wish to forget.

Note: This is case-sensitive" default answer "" with title "Forget Wi-Fi Access Point" with icon file "System:Library:CoreServices:CoreTypes.bundle:Contents:Resources:GenericNetworkIcon.icns"
set the wifiAP to the text returned of the result
do shell script "networksetup -removepreferredwirelessnetwork en0 "& quoted form of wifiAP
do shell script "networksetup -removepreferredwirelessnetwork en1 "& quoted form of wifiAP

echo "$result"

@Qwheel when I tried your script I got the following error:

Script result: 317:407: execution error: ** Error: Command requires admin privileges. (14)


Is it still working for you?