Delete or block "Create Network" or Computer-to-computer

Zeek
Contributor

Anyone knows how block or delete "Create Network" or Computer-to-computer option?

Teachers use LanSchool to manage each student but they found out how to turn of the wifi by just creating network.

8 REPLIES 8

pblake
Contributor III

Restrict System Preferences? Remove Menu bar icon? I would imagine the combination would do it.

mm2270
Legendary Contributor III

I know what setting enables the checkbox under Advanced for the "Create computer-to-computer networks" to require admin rights. and which plist file its stored in, but I'm not sure how to convert it into a Config Profile. I get the feeling there is some command line binary that can enable that checkbox without needing to mess with a config profile, but I'm not sure on that either.

This is assuming the students are not local admins. If they are, there's not much you'd be able to do to stop them from doing this other than disciplinary action.

mm2270
Legendary Contributor III

OK, finally figured it out. I knew I had seen the setting being discussed somewhere. I found the info on this link:
http://osxdaily.com/2007/01/18/airport-the-little-known-command-line-wireless-utility/ but its also possible someone on here put up this info on a thread as well.

So here's how you would do this with a simple script. I tested it on both 10.9 and 10.10 and it works nicely.

#!/bin/sh

## Get the Wi-Fi port identifier
WIFI=$(networksetup -listallhardwareports | awk '/Hardware Port: Wi-Fi/{getline; print $NF}')

## Set the Require Admin to create computer to computer networks setting to enabled
/System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport $WIFI prefs RequireAdminIBSS=YES

Assuming the students don't have admin rights on their accounts, this will stop them from creating those networks. When they try, the OS will prompt them for admin credentials to continue.

Zeek
Contributor

Thank you guys. We did figured how to block it.

1fa4de92954b49e0bb25f26fff90c7bc

ben_hertenstein
Release Candidate Programs Tester

Just what I needed! Thanks mm2270 :)

ben_hertenstein
Release Candidate Programs Tester

<@;)

lizmowens
New Contributor III

So as someone who has no scripting background and who really likes everything WYSIWYG, can someone please walk me through how to apply that awesome script above so I can turn off the "Create computer-to-computer networks" option in our students' Macbook Airs? :) All help greatly appreciated!

lizmowens
New Contributor III

Never mind! Figured it out thanks to some really awesome posts. Ran the script and it actually works. Woot! :)