Skip to main content

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. 

 

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.

 

#!/bin/bash # Allows non-admin users to add printers and manage their WiFi configuration. #For WiFi /usr/bin/security authorizationdb write system.preferences.network allow /usr/bin/security authorizationdb write system.services.systemconfiguration.network 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;

 


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") result=$( /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 APPLESCRIPT ) echo "$result"

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.

 

#!/bin/bash # Allows non-admin users to add printers and manage their WiFi configuration. #For WiFi /usr/bin/security authorizationdb write system.preferences.network allow /usr/bin/security authorizationdb write system.services.systemconfiguration.network 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?)


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.

 

#!/bin/bash # Allows non-admin users to add printers and manage their WiFi configuration. #For WiFi /usr/bin/security authorizationdb write system.preferences.network allow /usr/bin/security authorizationdb write system.services.systemconfiguration.network 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;

 


This doesn't seem to work anymore...


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") result=$( /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 APPLESCRIPT ) 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?