I am making a shell script for my mac and part of it requires connecting to my school’s wifi network.
I have tried both of the following commands and while the settings windows says that the computer has connected, it does not get DHCP nor authenticate with with EAP-PEAP.
networksetup -setairportnetwork en0 <network name> <username> <password> --eapmethod PEAP --innerauth MSCHAPv2
networksetup -setairportnetwork en0 <network name> <username> <password>
What is strange is that I am able to succsesfully connect to a wpa2 network using the networksetup -setairportnetwork en0 <network name> <username> <password>
command. Also, I can connect to the school network just fine by clicking connect in settings.
Nicholas Parker is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.