Is there a way to forget a WiFi network on MacOS without knowing the admin credentials?
MacOS – Forget WiFi network without admin credentials
- How to protect the Mac from reseting the admin password
- IPhone – way to disable WiFi auto-connect on iPhone
- IOS – How to actually forget all past Wifi networks on iOS
- MacOS – Change Local Admin passwords across the network
- MacOS – Anyway to find out what program is asking for admin credentials
- IOS – How to forget wifi in version 12.1.2
- MacOS – How to delete a new Admin account and its data without knowing the old admin password
From within macOS, no you can't.
If you don't unlock System Preferences you can't add or delete a Wi-Fi access point.
As you can see you can't select a Preferred Network and the
Neither can you do it from command line.
You can add a network with
sudo networksetup -addpreferredwirelessnetworkatindex en0 whateverNetwork 0 WPA2 whateverPasswordbut if you try to delete it without sudo - for example with
networksetup -removepreferredwirelessnetwork en0 whateverNetworkthen it will prompt you.
The reason is that the files updated are these - they are owned by root and can not be modified by a non-admin user. :
Also note as an aside that the data that is changed when you add/remove a preferred network is encrypted.
com.apple.airport.preferences.plistwas updated with wifi.ssid.77686174657665724e6574776f726b when adding and removing access point called whateverNetwork.
This means that if you booted from external OS to edit these files you would have to guess which keys to delete although in my limited testing they do appear to be in the same order as shown in System Preferences.