Skip to main content
Question

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

  • January 27, 2023
  • 5 replies
  • 171 views

Forum|alt.badge.img+1

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. 

 

5 replies

AJPinto
Forum|alt.badge.img+26
  • Legendary Contributor
  • 2802 replies
  • January 27, 2023

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;

 


Forum|alt.badge.img+8
  • Valued Contributor
  • 109 replies
  • January 31, 2023

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"

Forum|alt.badge.img+3
  • New Contributor
  • 2 replies
  • March 20, 2023

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?)


Forum|alt.badge.img+4
  • Contributor
  • 17 replies
  • August 16, 2023

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...


Forum|alt.badge.img+8
  • Contributor
  • 125 replies
  • August 23, 2023

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?