0
OS: (Arch Linux) Linux HP-Arch 4.17.4-1-ARCH
NetworkManager is able to connect to my AP, "SYSU-SECURE", which requires 802.1X authentication. However, I would like to run wpa_supplicant directly with a shell script now.
NetworkManager conf on "SYSU-SECURE" is here:
(generated by the GUI nm-applet)
(file: /etc/NetworkManager/system-connections/SYSU-SECURE)
[connection]
id=SYSU-SECURE
uuid=<SOME_UUID>
type=wifi
permissions=user:<SOME_LOCAL_ACCOUNT>:;
[wifi]
mac-address=00:DB:DF:78:F6:9F
mac-address-blacklist=
mode=infrastructure
ssid=SYSU-SECURE
[wifi-security]
auth-alg=open
key-mgmt=wpa-eap
[802-1x]
eap=peap;
identity=<SOME_USERNAME>
password=<SOME_PASSWORD>
phase2-auth=mschapv2
[ipv4]
dns-search=
method=auto
[ipv6]
addr-gen-mode=stable-privacy
dns-search=
method=auto
The conf above succeeds. But what I want is something like this:
(file: /usr/local/bin/connect_to_SYSU-SECURE.sh)
#!/bin/bash
wpa_supplicant -B -i wlo1 -c <(echo '
network={
ssid="SYSU-SECURE"
key_mgmt=IEEE8021X
eap=PEAP
phase2="auth=MSCHAPV2"
identity="<SOME_USERNAME>"
password="<SOME_PASSWORD>"
}')
dhcpcd -4 wlo1
The shell script above fails. Please correct it for me.
Thank you.
Sorry for replying with such a "latency" :) . Just now I had access to this AP and tried your solution. It works perfectly. Thanks. – Darren Ng – 2018-09-01T03:15:53.220