Skip to content

Instantly share code, notes, and snippets.

@mbmccormick
Created February 5, 2011 16:44
Show Gist options
  • Save mbmccormick/812579 to your computer and use it in GitHub Desktop.
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.
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
@mbmccormick
Copy link
Author

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):

shell
sudo su
bash pal2.sh

You'll then be prompted for your network login credentials. After a successful authentication, you should be connected to PAL2.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment