LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 01-30-2013, 10:31 AM   #1
Yaakov Ben-Avraham
LQ Newbie
 
Registered: Jan 2013
Location: Vancouver, Canada
Distribution: Slackware 14.0
Posts: 25

Rep: Reputation: Disabled
Question How do I set an ASCII key with iwconfig


In Slackware 14.0, according to

# man iwconfig

the following is supposed to set ascii key "blablabla"

# iwconfig wlan0 key s:blablabla

I get the following message instead

SET failed on device wlan0 : Invalid argument.

Am I doing something wrong, or is this a bug?
 
Old 02-01-2013, 02:18 AM   #2
ChrisAbela
Member
 
Registered: Mar 2008
Location: Malta
Distribution: Slackware 14.1
Posts: 467

Rep: Reputation: 87
According to http://superuser.com/questions/42460...lays-in-ubuntu

You need to satisfy one of these conditions:

ascii string that's exactly 5 characters in length
ascii string that's exactly 13 characters in length

You may have tried this for academic reasons, but otherwise, wicd or network-manager are highly recommended.
 
1 members found this post helpful.
Old 02-01-2013, 04:40 AM   #3
H_TeXMeX_H
Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269
I also recommend quotes around the password:

Code:
iwconfig wlan0 key "s:blabl"
 
Old 02-02-2013, 09:53 PM   #4
Yaakov Ben-Avraham
LQ Newbie
 
Registered: Jan 2013
Location: Vancouver, Canada
Distribution: Slackware 14.0
Posts: 25

Original Poster
Rep: Reputation: Disabled
Partly Solved

If I set the password to exactly 13 characters in length, then

# iwconfig wlan0 key restricted "s:blablabla "

is accepted (note trailing blanks to make 13 character phrase)

however,

I am unable to connect to the network, and

# ifconfig wlan0

does NOT show an INET address line with an IP address
(although an INET6 line is shown)

How should I proceed from here?
 
Old 02-02-2013, 09:56 PM   #5
willysr
Senior Member
 
Registered: Jul 2004
Location: Jogja, Indonesia
Distribution: Slackware-Current
Posts: 2,493

Rep: Reputation: 403Reputation: 403Reputation: 403Reputation: 403Reputation: 403
you need to ask for IP Address using dhcpcd wlan0 or dhclient wlan0
 
Old 02-03-2013, 02:40 PM   #6
Yaakov Ben-Avraham
LQ Newbie
 
Registered: Jan 2013
Location: Vancouver, Canada
Distribution: Slackware 14.0
Posts: 25

Original Poster
Rep: Reputation: Disabled
It workd with Key Off

I got an IP address if I did the following

# ifconfig wlan0 up
# iwconfig wlan0 essid "open"
# iwconfig wlan0 key off
# dhclient wlan0
# ifconfig wlan0

I got no IP address if I did the following

# ifconfig wlan0 up
# iwconfig wlan0 essid "ciphered"
# iwconfig wlan0 key restricted "sassphrase "
# dhclient wlan0
# ifconfig wlan0

Can you tell me what is wrong?
 
Old 02-03-2013, 03:32 PM   #7
volkerdi
Slackware Maintainer
 
Registered: Dec 2002
Location: Minnesota
Distribution: Slackware! :-)
Posts: 853

Rep: Reputation: 1658Reputation: 1658Reputation: 1658Reputation: 1658Reputation: 1658Reputation: 1658Reputation: 1658Reputation: 1658Reputation: 1658Reputation: 1658Reputation: 1658
If you embed blanks in the passphrase by using them within quotes, they will be considered part of the passphrase and will no longer match a passphrase that doesn't have the blanks. I'd suggest looking at the information in your router to find the equivalent hex key and using that to connect instead.
 
Old 02-03-2013, 03:44 PM   #8
Yaakov Ben-Avraham
LQ Newbie
 
Registered: Jan 2013
Location: Vancouver, Canada
Distribution: Slackware 14.0
Posts: 25

Original Poster
Rep: Reputation: Disabled
How does Windows translate the passphrase into a hex key?
The passphrase I enter in my Router works with Windows.
The Router "manual" (on CD) doesn't give encoding.

p.s. I am using a LinkSys EA2700 Router. I have found that
some Routers, such as the "D-Link" DIR-601, refuse to
work with Linux, even when hard-wired...
 
Old 02-03-2013, 04:40 PM   #9
volkerdi
Slackware Maintainer
 
Registered: Dec 2002
Location: Minnesota
Distribution: Slackware! :-)
Posts: 853

Rep: Reputation: 1658Reputation: 1658Reputation: 1658Reputation: 1658Reputation: 1658Reputation: 1658Reputation: 1658Reputation: 1658Reputation: 1658Reputation: 1658Reputation: 1658
Try this conversion form (no, it won't send your private key across the network):

http://jorisvr.nl/wpapsk.html

This will give you the hex key that you can connect with instead.

Also, I'm using a non-compliant length passphrase here with NetworkManager. The limitation you're running into is with iwconfig -- if you use a tool like wicd or NetworkManager you should be able to connect using your existing passphrase.
 
1 members found this post helpful.
Old 02-04-2013, 06:57 PM   #10
rabirk
Member
 
Registered: Dec 2012
Location: Maryland, US
Distribution: Debian
Posts: 83
Blog Entries: 5

Rep: Reputation: Disabled
Quote:
You may have tried this for academic reasons, but otherwise, wicd or network-manager are highly recommended.
I'm assuming this person tried using iwconfig and fussing about with the wpa_supplicant.conf file after reading AlienBOB's Wiki page on "Configuring your network in Slackware." I was intending to finish reading it, but let me know if it's out of date and I needn't bother. I can connect to my LAN wirelessly only when running KDE. For some reason my system doesn't connect when I boot into the CLI. I'm guessing I messed up one of the files referenced in the Wiki.
 
  


Reply

Tags
encryption, iwconfig, key, wifi, wireless


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
iwconfig: encryption key: off? tramni1980 Linux - Wireless Networking 2 07-13-2010 01:19 PM
trying to connect to wifi with iwconfig, but cannot set key... chutsu Linux - Networking 3 05-29-2010 01:13 PM
Ascii key combination? pidg30n Linux - Desktop 1 06-20-2007 04:09 PM
iwconfig cannot set WEP key muteki_sykes Linux - Wireless Networking 7 05-27-2006 05:07 PM
how to keep iwconfig encryption key odysseus.lost Linux - Wireless Networking 7 09-04-2005 03:10 PM


All times are GMT -5. The time now is 10:25 AM.

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