Removing Network-Manager And Manually Administering Wireless Connections In Linux

I needed to remove Network-Manager from my Ubuntu setup as I'm getting ready to implement some new network services for creating a test setup for a PXE boot cluster. It is my understanding from a few minutes of googling and one previous attempt that automatic network managers like Network-Manager can conflict with these sorts of setups. Particularly when trying to have both a wired Ethernet connection and a wireless connection active simultaneously.

Here are the exact steps I took on a Toshiba Satellite laptop running Ubunto 9.10. First make sure that you can connect to your wireless network and that you can connect to the internet.

Insure that wpasupplicant is installed on your computer.

Remove network-manger or other connection agent.

Convert your WPA ASCII password to a Pre-Shared Key (PSK) and save/append output to /etc/wpa_supplicant.conf
#  wpa_passphrase <your_essid> <your_ascii_key> | sudo tee -a /etc/wpa_supplicant.conf

Now you can test the new configuration
# sudo wpa_supplicant -i <interface> -c /etc/wpa_supplicant.conf -d

Here the -i defines the interface, -c the configuration file, and -d tells wpa_supplicant to be more verbose in its output/"debug" information.

The key to knowing if it worked is a string that looks like
CTRL-EVENT-CONNECTED - Connection to completed (auth) [id=0 _str=]

If your command doesn't connect read through the manual pages online about different drivers that are available to use. I was fortunate and could just use the default, wext. You can specify the driver by using the -D option.

# sudo wpa_supplicant -Dwext -ieth1 -c/etc/wpa_supplicant.conf -d

Now go ahead and make a backup of /etc/network/interfaces and edit the original with your favorite editor. My interfaces file only had the loop back device lo so I appended the following.

  1. auto eth1
  2. iface eth1 inet dhcp
  3. wpa-conf /etc/wpa_supplicant.conf

Here eth1 was the device name of my wireless adapter, this may be different for your setup.

The configuration is now complete, just reset the interface by sudo ifdown eth1 then sudo ifup eth1.

With these steps complete, I am now connected to my wifi connection without the use of Network-Manager.

Additional Resources

My explanation here was very brief but the following links is where I received my information. The above steps were all that was required for my personal setup.

http://ubuntuforums.org/showthread.php?t=571188
http://ubuntuforums.org/showthread.php?t=318539
https://help.ubuntu.com/community/WifiDocs/WPAHowTo
http://hostap.epitest.fi/wpa_supplicant/
http://ubuntuforums.org/archive/index.php/t-248023.html
http://ubuntuforums.org/showthread.php?t=1370796

Comments

Post new comment

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

More information about formatting options

By submitting this form, you accept the Mollom privacy policy.