Require Administrator Access to Change Wifi on Sonoma Command Not Working

zinkotheclown
Contributor II

Historically, I've been using this command to restrict modifying WiFi settings to admins only:

/usr/libexec/airportd en0 prefs DisconnectOnLogout=Yes JoinMode=Automatic JoinModeFallback=DoNothing RememberRecentNetworks=No RequireAdminIBSS=Yes RequireAdminNetworkChange=Yes RequireAdminPowerToggle=Yes

I've recently realized this no longer works on Sonoma.  Does anyone know of an alternative way to enable this on Macs running Sonoma?

 

 

1 ACCEPTED SOLUTION
2 REPLIES 2

GreatestJagras
New Contributor III

The below plist will disable wifi entirely and prevent it from being turned on by anyone, including admins. To re-enable, you'll have to uninstall the config profile and then run "networksetup -setnetworkserviceenabled Wi-Fi On" as just removing the config profile won't do it.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
  <dict>
    <key>DisableAirPort</key>
    <true/>
  </dict>
</plist> 

I just set the Preference Domain to com.apple.MCXAirPort and deploy it via Config Profiles > Application & Custom Settings.