Tag/tag.png

Unsupported Version
This article applies to an unsupported version of Ubuntu. More info...

Tag/tag.png

Candidate for Deletion
This article may not be appropriate for this wiki, and may be deleted. More info...

Introduction

This guide is about how to connect to the wireless network of the University of Maastricht (MAASnet) I have only tried this guide for Edgy,Feisty,Gutsy and Hardy but it will work for Dapper as well with high probability.

If you run Ubuntu Linux / Debian and want to connect to the wireless network of the University of Maastricht (MAASnet) and you have any questions / problems you can contact me : Email: <ubuntu-demon AT SPAMFREE ubuntu DOT com> Be sure to create and attach the following text files :

lsb_release -a > release.txt
lspci -nn > lspci-nn.txt
sudo lshw -C network > lshw-network.txt

network-manager (WifiDocs/NetworkManager) is able to connect to most normal wireless networks. It's very user friendly. Sadly network-manager isn't able to connect to the MAASnet network yet (as far as I know). This means we have to configure the network by hand.

Hardy intel 3945/4965 wireless

This doesn't work with intel iwl3945/iwl4965 in Hardy due to the transition from ipw (Gutsy and before) to iwl. It's easy to connect to the MAASnet using the intel 3945 windows driver wrapped with ndiswrapper. That is if you have no ethical problems with running the non-free windows driver while the iwl3945 driver is free software. This is just a temporary ugly solution. Follow "Hardy with ndiswrapper" below to make this work. The bug reports :

Hardy with ndiswrapper

  • For some wireless chipsets you need to use your windows driver to be able to connect to MAASnet
  • ndisgtk depends on ndiswrapper-common and ndiswrapper-utils-1.19 so you can install all three packages from usb if you don't have internet

(download them to a usb stick from packages.ubuntu.com)

  • issue the following commands :

sudo aptitude install ndisgtk
sudo ndisgtk
  • download your windows wireless driver from your manufacturer
  • point to the right .inf file of your windows driver (try the XP driver first)
  • rebooot
  • follow this guide from the start (you probably need "wext" for wpasupplicant but some people might need "ndis")
  • it works!

How to connect to the wireless network of the University of Maastricht (MAASnet)

Step 0 : while you are still connected to internet

* make sure your system is fully updated * type the following in the terminal to install a few packages : sudo aptitude install linux-generic wpasupplicant ndisgtk * download your windows wireless driver from your manufacturer * read this entire guide

Step 1 : disable networkmanager for your next sessions

Go to System->Preferences->Sessions and disable networkmanager

Step 2 : make sure wpasupplicant is installed

Check whether wpasupplicant is installed :

dpkg -l | grep wpasupplicant

If needed install wpasupplicant by (you need internet for this) :

sudo aptitude install wpasupplicant

Step 3 editting /etc/wpa_supplicant/wpa_supplicant.conf

In this guide you have to edit 2 files : /etc/network/interfaces and /etc/wpa_supplicant/wpa_supplicant.conf

gksudo gedit /etc/wpa_supplicant/wpa_supplicant.conf

And make it look like this /etc/wpa_supplicant/wpa_supplicant.conf :

network={
ssid="MAASnet"
key_mgmt=IEEE8021X
wep_key0=12345678901234567890123456
phase2="auth=MSCHAPV2"
identity="i******"
password="*******"
}
  • Replace 12345678901234567890123456 by any string of random 26 numbers for security. You can generate this using this python script if you want (save it to a genkey.py and type : python genkey.py)

__doc__ = """generate a random wepkeys which work with maasnet (26 
random numbers)"""
import random
for i in range(10):
  b = ""
  for a in range(26):
    b = b + str(random.randint(0,9))
  print "wep_key0=" + b
  • Replace "i******" by your student ID number

  • Replace "*******" by your student password (which is the same as for email)

Step 4 : connect for testing (and debugging if needed)

This show you all your network interfaces :

ip addr
iwconfig

Now make sure all your networkinterfaces are down :

sudo ifdown eth0
sudo ifdown eth1
.....
.....

Replace eth0 and eth1 for your network interfaces that are up (except lo). Your wireless interface is often called eth1 or wlan0 but you can check with iwconfig. If you don't see a wireless interface try using ndiswrapper to use your windows driver. Your wired ethernet interface is often called eth0.

Now to actually try to connect to the network :

sudo wpa_supplicant -c /etc/wpa_supplicant/wpa_supplicant.conf -i eth1 -D wext

Replace eth1 with your wireless interface. $iwconfig will show you your wireless interface(s).

Most people need wext. Replace wext with your the wpa-driver you need. Try wext if you don't know which one to use. To use your windows driver choose ndiswrapper and read the part in this guide about ndiswrapper. Here's a bit more information from /usr/share/doc/README.modes :

Table of supported drivers
==========================

A summary of supported drivers follows:

Driver          Description
======          ===========
hostap          Host AP driver (Intersil Prism2/2.5/3)
madwifi         MADWIFI 802.11 support (Atheros, etc.)
atmel           ATMEL AT76C5XXx (USB, PCMCIA)
wext            Linux wireless extensions (generic)
ndiswrapper     Linux ndiswrapper
ipw             Intel ipw2100/2200 driver
wired           wired Ethernet driver
test            test driver

If something goes wrong try to change the wpa-driver or dive into wpasupplicant's debugging mode (use -dd for more debugging output) :

sudo wpa_supplicant -c /etc/wpa_supplicant/wpa_supplicant.conf -i eth1 -D wext -d

Even more debugging output :

sudo wpa_supplicant -c /etc/wpa_supplicant/wpa_supplicant.conf -i eth1 -D wext -dd

Once you get something like "successful" remember the wpa-driver you used and press ctrl+c.

Step 5 : editting your /etc/network/interfaces

Now edit your /etc/network/interfaces by :

gksudo gedit /etc/network/interfaces

/etc/network/interfaces :

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

auto eth0
iface eth0 inet dhcp

auto eth1
iface eth1 inet dhcp
wpa-driver wext
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf

Don't remove the lo lines. You can choose to comment all other lines. Add these four relevant lines for your wireless interface.

Replace eth1 by your wireless interface. Replace wext by the wpa-driver that works best with your wireless card.

This shows you all your network interfaces :

ip addr
iwconfig

Now make sure all your network interfaces are down :

sudo ifdown eth0
sudo ifdown eth1
sudo ifdown wlan0
sudo ifdown wlan1
.....
.....

Replace eth0 and eth1 and wlan0 and wlan1 for your network interfaces that are up (except lo). Often your wireless interface will be called eth1 or wlan0 (check with iwconfig). Your wired ethernet interface is often called eth0 (check with ip addr when you have an ip on your wired interface to see which one it is).

Step 6 : let's hope it works

Now let's hope it works (replace eth1 for your wireless interface :

sudo ifup eth1

When you switch networks and don't want to reboot :

sudo ifdown eth1 ; sudo ifup eth1

== Step 7 : protect your network settings and unimaas passpord =

Now protect your network settings and unimaas password :

sudo chown root:root /etc/wpa_supplicant/wpa_supplicant.conf
sudo chmod 600 /etc/wpa_supplicant/wpa_supplicant.conf 

You can still edit your /etc/wpa_supplicant/wpa_supplicant.conf by typing :

sudo gedit /etc/wpa_supplicant/wpa_supplicant.conf

More information and other networks

You can find wpasupplicant documentation in /usr/share/doc/wpasupplicant and /usr/share/doc/wpasupplicant/examples. Some documentation is compressed. To uncompress them :

gunzip /usr/share/doc/wpasupplicant/*.gz
gunzip /usr/share/doc/wpasupplicant/examples/*.gz

Example wpa_supplicant.conf. Uncomment and adapt any networks you use :

# MAASnet
network={
ssid="MAASnet"
key_mgmt=IEEE8021X
wep_key0=65190159381713902819208232 # random!
phase2="auth=MSCHAPV2"
identity="i****" # specify
password="*****" # specify
}

# wpa2-personal network (very secure)
# use these settings on your home wireless network combined with mac filtering
#network={
#ssid="example"    # specify ssid/name here
#bssid=99:23.....  # specify bssid here (mac adress of your router)
#proto=WPA2
#key_mgmt=WPA-PSK
#pairwise=CCMP
#group=CCMP
#psk=abc5df4.... # specify hex psk here
#
#secure example when choosing ssid and psk :
#yourssid : pwgen -s -0 
#generate passphrase : pwgen -s -y 63
#hex psk : wpa_passphrase yourssid
#now type in your passhrase and you have your hex psk 
#(you don't have to remember anything just set it at your machines and router)
#}

#wpa2-personal network (secure if using long random psk)
#network={
#ssid="example"
#proto=WPA2
#key_mgmt=WPA-PSK
#psk="************************"   #plain text passphrase
#}

#wep network (very insecure : you should change keys very often)
#network={
#ssid="example"
#key_mgmt=NONE
#wep_key0="*******************"
#}

#open network (very very insecure don't use this unless you tunnel it over ssh/vpn)
#network={
#key_mgmt=NONE
#}

if you need more help

More general wireless documentation : WifiDocs

If you run Ubuntu Linux / Debian and want to connect to the wireless network of the University of Maastricht (MAASnet) and you have any questions / problems you can contact one of the following people :

  • Email: <ubuntu-demon AT SPAMFREE ubuntu DOT com>

  • your name ?

Be sure to create and attach the following text files :

lsb_release -a > release.txt
lspci -nn > lspci-nn.txt
sudo lshw -C network > lshw-network.txt

WifiDocs/WirelessNetworkOfUniversityOfMaastricht (last edited 2015-03-30 19:14:32 by knome)