Ability to disable 'Turn Wi-Fi Off'

azevon
New Contributor II

Greetings All,

So now my students are getting sly. Or lazy. Or both. They will now sit in the corner of the library and turn off wi-fi to evade us from snooping. Of course this cuts off their Internet access, etc. - but they get a kick out of it and it pisses us (IT) off! Could there be a way to either remove the 'Turn Wi-Fi Off' from the drop-down wireless menu (as well as the on/off button in System Prefences/Network OR disable the ability all together with a policy or config profile?

Thanks much in advance.

Andy

14 REPLIES 14

mm2270
Legendary Contributor III

Are you talking about Macs or iOS devices? It sounds like you're talking about Macs. If so, then yes, there is a way to not allow non admins to disable Wi-Fi. I'm assuming they are not local admins. If so, then the option I'm thinking of won't do much good of course.

StoneMagnet
Contributor III

@azevon You can use the /System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport command to set several WiFi options. Issue the command /System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport --help prefs in Terminal to see what the prefs settings available are.

azevon
New Contributor II

Yup I'm referring to Macs. The users do have admin rights, however they are restricted from accessing Terminal. I brought up the settings on a test machine but I can't seem to find which one would provide me with ability to restrict the on/off capabilities. Could you possibly help with that?

azevon
New Contributor II

Yup I'm referring to Macs. The users do have admin rights, however they are restricted from accessing Terminal. I brought up the settings on a test machine but I can't seem to find which one would provide me with ability to restrict the on/off capabilities. Could you possibly help with that?

azevon
New Contributor II

Sorry for the double post. Fat fingered my fat fingers...

mm2270
Legendary Contributor III

@azevon unfortunately the setting mentioned by @StoneMagnet above is what I was referring to, but as mentioned, it will do you no good if the students have local admin rights. It's not about Terminal access. All that setting will do is make it so when they try to turn off WI-Fi from the menu they'll be asked to enter their admin password. They'll enter it and the OS will turn off Wi-Fi. There's no effective way I know of to stop them from doing this if they have admin rights.
It's just kind of the nature of dealing with admins on Macs. Your options of what you can restrict or stop them from doing become very limited.

azevon
New Contributor II

Ah - gotcha now. Thanks for your help and reply.

mm2270
Legendary Contributor III

Sure thing, In case you're curious or want to know for the future, the option that does it is called "RequireAdminPowerToggle" The command to enable it is:

sudo /System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport prefs RequireAdminPowerToggle=true

With that in place, in System Preferences > Wi-Fi > Advanced, you will see this option become checked:
f0dc808065c449f9b9e410e07349c4f6

The other 2 options there can also be enabled with similar commands. Those would be:

sudo /System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport prefs RequireAdminIBSS=true

and

sudo /System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport prefs RequireAdminNetworkChange=true

respectively.

hsekiv
Contributor

Is it possible to do this for iOS? With the latest updates, I can control which WiFi networks the iPads can join, but the students can still turn WiFi off.

nelsonpark
New Contributor III

i dont think it can be toggled on ios through a policy. it seems to be one of those 'user privileges' to be able to control if they connect or not, specified from apple. similar to the 'reduce motion' setting. they consider it user based, but we dont want it on our entire fleet of shared ipads...

JustDeWon
Contributor III

What you can possibly do is hide the WiFi status icon from the Menu bar.. Then restrict them from accessing the Network settings from System Preferences.. Kinda like a work around..

mm2270
Legendary Contributor III

@JustDeWon As we're talking about crafty and resourceful students, it would probably take them all of one day, or maybe a half, to locate the /System/Library/CoreServices/Menu Extras/AirPort.menu and double click it to open the Wi-Fi menu again. A simple Google search would likely pull up how to open menu items from the Finder.

So much for that workaround. : /

JustDeWon
Contributor III

@mm2270 .. yea.. that's true. lol, that was just one of those shots in the dark.

StoneMagnet
Contributor III

Another approach is to have a LaunchAgent that watches /Library/Preferences/SystemConfiguration/preferences.plist for changes and then runs a script to check the Airport power state. /System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport --getinfo should return AirPort: Off when it's off. The script could then turn it back on. The article OSX Tips – Turn off WiFi from the command line shows how to find the Airport interface (since it isn't en0 on all Mac laptops) and turn it on/off via a script.