Last active
April 28, 2024 14:34
-
-
Save smorad/d9df55c562d0e95cf54507ec91364f11 to your computer and use it in GitHub Desktop.
Cambridge eduroam on Ubuntu Server 20.04 (on a raspberry pi)
This file contains 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
# First setup Ubuntu 20.04 on your SD card if you haven't already | |
# I assume by this point you have the Ubuntu SD card still in your laptop/pc | |
# We need to copy the cat tool to the SD card | |
# Download the installer here: https://cat.eduroam.org/ | |
# Add the cat installer to the pi SD card; run these commands on your laptop | |
mkdir /mnt/rpi | |
# Find the block device for your SD card. Be careful here -- you can mess up your OS if you choose the wrong device! | |
lsblk # You should see something like | |
# mmcblk0 259:0 0 15.4G 0 disk | |
# ├─mmcblk0p1 259:1 0 256M 0 part /boot/efi | |
# ├─mmcblk0p2 259:2 0 2G 0 part | |
# Notice the devide size 15.4G is the size of the SD card | |
# this is how we know it is the SD card and not your laptop's drive | |
# Pick the bigger partition, in this case it is /dev/mmcblk0p2 | |
sudo mount /dev/<YOUR_SDCARD_PARTITION> /mnt/rpi | |
sudo cp ~/Downloads/<PATH_TO_EDUROAM_CAT_INSTALLER>.py | |
sudo umount /mnt/rpi | |
# Ok now we are done with the SD card, pop it out and put it into the raspberry pi and boot up | |
# Log into the raspberry pi using login ubuntu:ubuntu | |
# You may get invalid password error, wait until something about SSH prints to the console, then try again | |
# Run the cat installer, it's possible the name is different | |
python3 /eduroam-linux-UoC-eduroam_local_CA.py | |
# Enter your info as you normally would for a linux PC | |
# You'll get some error about wpa_supplicant, this is ok | |
# Create a netplan network config | |
sudo nano /etc/netplan/49-eduroam.yaml | |
# Type in the following. Be aware, indentation/spacing matters! | |
# Fill out password and identity with your own from the Cambridge eduroam token generator website | |
network: | |
wifis: | |
wlan0: | |
dhcp4: yes | |
access-points: | |
"eduroam": | |
auth: | |
key-management: eap | |
method: peap | |
anonymous-identity: "[email protected]" | |
identity: "<YOUR_CRSID_+_DEVICE>" | |
password: "<YOUR_REALLY_LONG_PASSWORD>" | |
ca-certificate: "/home/ubuntu/.cat_installer/ca.pem" # Created by the cat installer | |
# Now let's use our netplan config | |
sudo netplan generate | |
# There is a BUG in ubuntu 20.04 that is fixed once we update/connect to wifi | |
# Try netplan apply anyways, you will probably get an error about wlan0.service not existing | |
# See https://askubuntu.com/questions/1291424/failed-to-start-netplan-wpa-wlan0-sevice-unit-netplan-wpa-wlan0-service-not-fou | |
sudo netplan apply | |
# To fix, we must reboot | |
sudo reboot | |
# Try again | |
sudo netplan apply | |
# You should now have wifi! Verify with a ping | |
ping google.com |
There's a typo:
ca-cerificate
must beca-certificate
.
Fixed!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
There's a typo:
ca-cerificate
must beca-certificate
.