diary at Telent Netowrks

NetworkManager No More#

Sat, 29 Jun 2013 22:43:08 +0000

Finally fed up with it randomly stalling and hanging for tens of seconds at a time, I decided yesterday to reinstall my laptop using ext4 instead of btrfs[*]. This time around I've done it all with Puppet, so I can tell you about my other recent change - connecting to protected WPA wireless networks without the "assistance" of NetworkManager.

It turns out to be amazingly simple if you're reasonably acquainted with editing text files: you need a stanza in /etc/wpa_supplicant.conf for each network you want to connect to (and optionally, each network you want to tell it about that it should not connect to)

network={
        ssid="My SSID"
	priority=20
        #psk="not a passphrase"
        psk=8649204ac9cecc467b6c7cb35806627736c3e28f8303d73f2e9afb0a1dff871c
        id_str "default"
}
network={
        ssid="My other SSID"
	priority=20
        #psk="not a passphrase"
        psk=33e4836e7a1325ee4abe6e7ba0f4f9f2f0927aac6d476b001a2469b67e5f2ad7
        id_str "default"
}
network={
        ssid="Some annoying captive portal"
	priority=0
        id_str "ignore"
}

and then you need to put stuff in /etc/network/interfaces to tell it to use wpa-roam

iface wlan0 inet manual
  wpa-driver wext
  wpa-roam /etc/wpa_supplicant.conf

and then some more stuff to correspond to each id_str you've used in wpa_supplicant.conf

iface default inet dhcp
iface ignore inet manual

My setup is not exactly what you see in this commit because I'm not quite stupid enough to put real keys into Github - but it's otherwise pretty close. And for the rest of the repository, see here

[*] it remains to be seen if it makes any difference at all, but it was probably about due for a good decrufting anyway