Automatic wi-fi disabling

Joined
Jun 27, 2013
Messages
3
Reaction score
0
Points
1
Hi

I'm trying to see if on OSX it's possible to automatically disable wi-fi when an Ethernet cable is attached to the device. We don't want users connecting to open Wi-Fi networks when connected to the corporate LAN. I know how to do it in Windows (latest NIC drivers support it) but can't find anything about it in OSX.

Any help gratefully received
 

Raz0rEdge

Well-known member
Staff member
Moderator
Joined
Jul 17, 2009
Messages
15,765
Reaction score
2,106
Points
113
Location
MA
Your Mac's Specs
2022 Mac Studio M1 Max, 2023 M2 MBA
While you can't disable the WiFi on the existence of the Ethernet cable, you can set the service order to give the Ethernet connection a higher priority.

Open up System Perferences->Network and you will see a list of network devices on the left. Click on the gear icon there a a drop-down will appear. From the drop-down, chose "Set Service Order", and in the window that will appear, drag Ethernet to be the first one and then WiFi.

Additionally, for the Wifi, click on Advanced and the first tab is your preferred networks. Set the order like you want and then if you want to further lock this down, you can check on the option "Change network" under the title "Require administrator authorization to:"

When you're all done, hit the padlock icon to lock the settings and off you go..
 

IWT


Joined
Jan 23, 2009
Messages
10,285
Reaction score
2,227
Points
113
Location
Born Scotland. Worked all over UK. Live in Wales
Your Mac's Specs
M2 Max Studio Extra, 32GB memory, 4TB, Sonoma 14.4.1 Apple 5K Retina Studio Monitor
Ashwin has forgotten more than I will ever know, so I offer this with some trepidation.

With Ethernet connected, you can click on the WiFi icon on the top Menu Bar and, from the drop down, choose "Turn WiFi on" or "Turn WiFi off".

Via System Preferences>Network, in addition to setting the order (in your case Ethernet as first choice), you can again Turn off the WiFi.

Ian
 
OP
A
Joined
Jun 27, 2013
Messages
3
Reaction score
0
Points
1
Thanks for that - I really needed to stop the users being able to turn it on when connected to the corporate network (we have regulatory requirements - PCI). Looks as though Ashwin's is the way I'm going to have to go.
 
OP
A
Joined
Jun 27, 2013
Messages
3
Reaction score
0
Points
1
Ashwin

Thanks for that - not ideal but it'll have to do. AS, in Windows, it the driver for the Ethernet card that does the work, I hope they may port that functionality over to OSX,
 

Slydude

Well-known member
Staff member
Moderator
Joined
Nov 15, 2009
Messages
17,612
Reaction score
1,078
Points
113
Location
North Louisiana, USA
Your Mac's Specs
M1 MacMini 16 GB - Ventura, iPhone 14 Pro Max, 2015 iMac 16 GB Monterey
Nice find. I had completely forgotten that tip.
 

Raz0rEdge

Well-known member
Staff member
Moderator
Joined
Jul 17, 2009
Messages
15,765
Reaction score
2,106
Points
113
Location
MA
Your Mac's Specs
2022 Mac Studio M1 Max, 2023 M2 MBA
Nice find MrPlow, if the OP is using an account with limited control and unable to turn on WiFi when connected to Ethernet, wouldn't this script fail as well?
 
Joined
Oct 1, 2007
Messages
7,163
Reaction score
275
Points
83
Location
UK
Your Mac's Specs
Mac Mini i5 (2014 High Sierra), iPhone X, Apple Watch, iPad Pro 12.9, AppleTV (4)
Nice find mrplow, if the OP is using an account with limited control and unable to turn on WiFi when connected to Ethernet, wouldn't this script fail as well?

You may well be right but the OP hasn't mentioned anything about account restrictions. If anything it seems like the lack of restrictions that's the issue in the first instance
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top