Posted on 04-20-2017 09:36 AM
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
Posted on 04-20-2017 09:39 AM
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.
Posted on 04-20-2017 09:41 AM
@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.
Posted on 04-20-2017 10:11 AM
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?
Posted on 04-20-2017 10:11 AM
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?
Posted on 04-20-2017 10:13 AM
Sorry for the double post. Fat fingered my fat fingers...
Posted on 04-20-2017 10:25 AM
@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.
Posted on 04-20-2017 10:27 AM
Ah - gotcha now. Thanks for your help and reply.
Posted on 04-20-2017 10:38 AM
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:
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.
Posted on 04-20-2017 05:07 PM
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.
Posted on 04-20-2017 07:28 PM
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...
Posted on 04-21-2017 09:21 AM
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..
Posted on 04-21-2017 09:27 AM
@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. : /
Posted on 04-21-2017 09:35 AM
@mm2270 .. yea.. that's true. lol, that was just one of those shots in the dark.
Posted on 04-21-2017 09:45 AM
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.