This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
read -p "Numero Mecanografico r"(a|pg)\d{5-6}": " nAluno | |
read -s -p "Password: " pass | |
ifname=$(ip link | grep -Po '\d: (w\w*):' | grep -Po 'w\w*') | |
nmcli connection add type wifi ifname $ifname con-name eduroam ssid eduroam -- ipv4.method auto \ | |
wifi-sec.key-mgmt wpa-eap 802-1x.eap peap \ | |
802-1x.phase2-auth mschapv2 \ | |
802-1x.identity "${nAluno}@alunos.uminho.pt" 802-1x.password "$pass" |