Posted on 01-26-2023 06:41 PM
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.
Posted on 01-27-2023 11:11 AM
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;
Posted on 03-20-2023 08:43 AM
Hi @AJPinto
Other than WiFi and Printing, do you also use/edit authorizationdb to allow other things? (such as software update?)
Posted on 08-16-2023 11:18 AM
This doesn't seem to work anymore...
Posted on 01-31-2023 01:32 AM
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"
Posted on 08-23-2023 09:57 AM
@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?