Created
February 5, 2011 16:44
-
-
Save mbmccormick/812579 to your computer and use it in GitHub Desktop.
Automated script to connect your Google Cr-48 laptop to PAL2.0 at Purdue.
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
NETWORK=$(wpa_cli -i wlan0 add_network) || exit | |
read -p "Username: " USERNAME || exit | |
wpa_cli -i wlan0 set_network $NETWORK ssid \"PAL2.0\" > /dev/null || exit | |
wpa_cli -i wlan0 set_network $NETWORK scan_ssid 1 > /dev/null || exit | |
wpa_cli -i wlan0 set_network $NETWORK proto WPA > /dev/null || exit | |
wpa_cli -i wlan0 set_network $NETWORK priority 1 > /dev/null || exit | |
wpa_cli -i wlan0 set_network $NETWORK key_mgmt WPA-EAP > /dev/null || exit | |
wpa_cli -i wlan0 set_network $NETWORK eap PEAP > /dev/null || exit | |
read -p "[email protected]'s password: " -s PASSWORD || exit | |
echo -e "" || exit | |
wpa_cli -i wlan0 set_network $NETWORK identity \"$USERNAME\" > /dev/null || exit | |
wpa_cli -i wlan0 set_network $NETWORK password \"$PASSWORD\" > /dev/null || exit | |
wpa_cli -i wlan0 set_network $NETWORK phase2 \"auth=MSCHAPV2\" > /dev/null || exit | |
wpa_cli -i wlan0 select_network $NETWORK > /dev/null || exit |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You should save this script to
/mnt/stateful_partition/home/chronos/pal2.sh
in order to prevent this file from being lost after a reboot. To run this script, you'll issue the following commands after entering a Crosh terminal (CTRL + ALT + T):You'll then be prompted for your network login credentials. After a successful authentication, you should be connected to PAL2.0.