networksetup: add functionality to set preferred network
| Originator: | fti | ||
| Number: | rdar://33047982 | Date Originated: | 29-Jun-2017 07:34 AM |
| Status: | Open | Resolved: | |
| Product: | macOS + SDK | Product Version: | 10.13 |
| Classification: | Enhancement | Reproducible: | Always |
Summary: networksetup: add functionality to set preferred network networksetup cli tool allows to list, add (at index) and remove one or all preferred wireless networks. In enterprise environments, we need to set the preferred network. Business Case: While setting up the Mac via DEP, it is not uncommon to choose a guest Wi-Fi network during MacBuddy. We will then push a SCEP+Wi-Fi profile which will arrive at index 1 (vs. 0). Meaning the computer will preferably connect to the guest network. We could delete the guest network, but we'd like to keep it in case the corporate network go down, or when visiting certain affiliates where the corporate network is connected differently. Steps to Reproduce: 1. Setup Mac via MacBuddy 2. Connect to a guest network during setup 3. Push a profile with a Wi-Fi network Expected Results: Pushed Wi-Fi network should either be set at index 0, or we should have an option to script it. In this case networksetup is a good start Actual Results: Pushed Wi-Fi network is appended to preferred networks array. Version: 10.13 Notes: I'd like to have an option like "networksetup -setpreferrednetwork <device name> <network>"
Comments
Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!