Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Networking
User Name
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.


  Search this Thread
Old 04-20-2012, 07:43 PM   #1
LQ Newbie
Registered: Feb 2012
Distribution: Debian, Fedora
Posts: 24

Rep: Reputation: 0
Whats the deal with wpa_supplicant.conf

I'm trying to connect to a wpa wireless network via linux command line. As many of you know, this is needlessly complex.

I am using a BackTrack 5 CD with an Alfa networks USB wireless card. The interface is named wlan0.

After browsing around for several hours, it seems the best way to establish a connection is via the wpa_supplicant command. The problem is there are lots of different ways to write a config file, but no website explains how to actually build one.

One common method is to use the wpa_password command. This generally creates the following file.

Most websites ask me to uncomment the plaintext password or to delete the hex password.

Many websites also tell me to include the following lines

Although the ap_scan arguement can be a value between 0 and 2 depending on the website. It instructs me to pick the one that's appropriate for my card. Whatever that is.

the ctrl_interface is interesting because it always seems to reference /var/run/wpa_supplicant regardless of the website, but that file doesn't even exist on my machine.

Other information that is often included but never explained are the following lines.


Anyway, regardless of the config file I use the result is always the same.

Trying to associate with <My MAC address> (SSID="mynetwork" freq=2462 MHz)
Authentication with <My MAC address> timed out.
Trying to associate with <My MAC address> (SSID="mynetwork" freq=2462 MHz)
Associated with <My MAC Address>
CTRL-EVENT-DISCONNECTED - Disconnect even - remove keys
Then it repeats the last four lines until I ctrl+c.

A lot of websites also suggest editing startup scripts and rebooting the computer, but since this is a live disk, that won't work.

If anyone could explain any part of what I just talked about, I would be ecstatic.
Old 04-22-2012, 08:26 AM   #2
LQ Guru
Registered: Sep 2003
Location: Danville, VA
Distribution: Slackware, Windows, FreeBSD, OpenBSD, Mac OS X
Posts: 5,294

Rep: Reputation: 168Reputation: 168
Hi svenxix, Welcome to LQ. Here is an example file with explanations.

Good luck. ;-)
Old 04-23-2012, 03:18 AM   #3
Registered: Oct 2011
Location: New Zealand
Distribution: Debian
Posts: 105

Rep: Reputation: 37
The crunchbang forums have an interesting howto on wpasupplicant here...


backtrack, wireless, wpa

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Whats the deal with UTC anyway?? tekhead2 Linux - General 3 07-27-2009 11:30 AM
Whats the deal with bootstrap? tsunami_imcool Linux - Software 3 07-11-2007 06:35 PM
Whats the deal with Kaffeine? Balarabay1 SUSE / openSUSE 1 04-09-2006 07:43 PM
Whats the deal with libraries? Smaugur [SWE] Linux - Newbie 9 04-02-2004 10:39 AM
kernel 2.6 whats the deal demmylls Linux - General 2 09-11-2003 10:56 AM

All times are GMT -5. The time now is 11:50 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration