Setting up 802.1x auth using command line in Ubuntu
My company’s network has 802.1x auth. So I need to auth my network.Today we using the nmcli tool to set up network.
which nmcli
nmcli con edit eth0
nmcli> set ipv4.method auto
nmcli> set 802-1x.eap peap
nmcli> set 802-1x.identity USERNAME
nmcli> set 802-1x.phase2-auth mschapv2
nmcli> save
nmcli> quit
Now the system had created a new config file. The path is /etc/NetworkManager/system-connections/eth0
Then we edit it
sudo vim /etc/NetworkManager/system-connections/eth0
[connection]
id=CONNECTION_NAME
[802-1x]
password=YOUR_8021X_PASSWORD
Save the file and close it. Restart NetworkManager to pick up the changes
systemctl restart NetworkManager
or
nmcli con down eth0
nmcli con up eth0
Thanks for writing this blog. golink[https://major.io/2016/05/03/802-1x-networkmanager-using-nmcli/]