LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 08-16-2007, 04:15 PM   #1
BCarey
Senior Member
 
Registered: Oct 2005
Location: New Mexico
Distribution: Slackware
Posts: 1,639

Rep: Reputation: Disabled
wpa_gui/wpa_supplicant does not "release" ip when changing networks


In my seemingly never-ending attempts to conveniently roam from network to network with my laptop, I am trying wpa_gui again. I like it, but it has highlighted a problem I have when changing networks.

I start at network A. All is well, dhcp gives me ip address x. Now I go elsewhere and try to connect to network B. It associates fine to network B, wpa encryption key and all work fine, but it does not obtain a new ip address, and still shows address x which I was given from network A. So even though I am associated with network B, I can't actually do anything. Running "/etc/rc.d/rc.inet1 wlan0_restart" fixes the problem, but that makes wpa_gui essentially useless.

Any ideas how to fix this?

Brian
 
Old 08-17-2007, 08:36 AM   #2
onebuck
Moderator
 
Registered: Jan 2005
Location: Central Florida 20 minutes from Disney World
Distribution: SlackwareŽ
Posts: 13,927
Blog Entries: 45

Rep: Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159
Quote:
Originally Posted by BCarey View Post
In my seemingly never-ending attempts to conveniently roam from network to network with my laptop, I am trying wpa_gui again. I like it, but it has highlighted a problem I have when changing networks.

I start at network A. All is well, dhcp gives me ip address x. Now I go elsewhere and try to connect to network B. It associates fine to network B, wpa encryption key and all work fine, but it does not obtain a new ip address, and still shows address x which I was given from network A. So even though I am associated with network B, I can't actually do anything. Running "/etc/rc.d/rc.inet1 wlan0_restart" fixes the problem, but that makes wpa_gui essentially useless.

Any ideas how to fix this?

Brian
Hi,

You will need to release/reset the device to allow moving between the networks. Once you log off of 'A' you should reset which is what you are doing with the "/etc/rc.d/rc.inet1 wlan0_restart" then the 'B' will give it all to you.
 
Old 08-17-2007, 09:09 AM   #3
BCarey
Senior Member
 
Registered: Oct 2005
Location: New Mexico
Distribution: Slackware
Posts: 1,639

Original Poster
Rep: Reputation: Disabled
Hi Gary,

So there is no way to make it automatic? It's too bad, because when I move from network to network the re-association part happens automatically. If I could just get it to release the ip, it could be fully automatic.

Thanks,
Brian
 
Old 08-17-2007, 02:02 PM   #4
mattydee
Member
 
Registered: Dec 2006
Location: Vancouver, BC
Distribution: Debian,Ubuntu,Slackware
Posts: 479

Rep: Reputation: 48
Hi BCarey,

I have the same problem. I suspect that maybe the problem is that wpa_gui runs with user privileges whilst obtaining a new ip:

Code:
dhcpcd -k wlan0
dhcpcd wlan0
requires root privileges.

There must be a way to configure slackware to allow users to use the dhcpcd command. After all, it doesn't really make any sense to allow users to switch networks only to forbid them from renewing ip.

Anyways, I think only after users have access to dhcpcd can wpa_gui be configured to renew automatically (without asking for root pass or anything). I will look into it and post back if I find an answer.
 
Old 08-17-2007, 02:18 PM   #5
mattydee
Member
 
Registered: Dec 2006
Location: Vancouver, BC
Distribution: Debian,Ubuntu,Slackware
Posts: 479

Rep: Reputation: 48
well, chmod u+s /sbin/dhcpcd seems to have taken care of step 1.
I will post in the security forum to see if this posses a major security risk.

** it might be better if one could instead setup access to dhcpcd through groups...

Last edited by mattydee; 08-17-2007 at 02:20 PM.
 
Old 08-17-2007, 02:38 PM   #6
BCarey
Senior Member
 
Registered: Oct 2005
Location: New Mexico
Distribution: Slackware
Posts: 1,639

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by mattydee View Post
After all, it doesn't really make any sense to allow users to switch networks only to forbid them from renewing ip.
My thoughts exactly.

If I run wpa_gui as root, it should release the ip? (I've been running it with sudo.) Unfortunately I cannot test this from where I am.

Brian

Last edited by BCarey; 08-17-2007 at 02:48 PM.
 
Old 08-17-2007, 02:48 PM   #7
BCarey
Senior Member
 
Registered: Oct 2005
Location: New Mexico
Distribution: Slackware
Posts: 1,639

Original Poster
Rep: Reputation: Disabled
Okay, I was able to test it and it doesn't work. chmod u+s doesn't work either (well, it works from the cli, but not from wpa_gui). It seems like wpa_gui doesn't even try to drop the ip.

Brian
 
Old 08-17-2007, 11:55 PM   #8
acummings
Member
 
Registered: Jul 2004
Distribution: Slackware
Posts: 615

Rep: Reputation: 50
At projects link is a reset network sh script.

Wireless? I guess so.

I don't know anything about it. Out of curiosity, a search on wpa_gui didn't turn up much. (what is wpa, curiosity) I think I know what it is now. Next resulted from search on wpa_supplicant

Code:
http://wiki.archlinux.org/index.php/Wireless_Setup#Using_the_Archlinux_Roaming_Network_Profiles

http://www.pittgeeks.org/projects/

http://wiki.archlinux.org/index.php/Wpa_supplicant

http://www.pitt.edu/~crp11/pittlinux/xsupplicant/

http://linux.die.net/man/5/wpa_supplicant.conf

http://www.google.com/linux?hl=en&q=wpa_supplicant&btnG=Search
--
Alan.
 
Old 08-18-2007, 12:05 AM   #9
acummings
Member
 
Registered: Jul 2004
Distribution: Slackware
Posts: 615

Rep: Reputation: 50
Quote:
At projects link is a reset network sh script.
Wrong. My mistake. It's a config/setup script to make wpa_supplicant work on a certain university network (where you likely also cannot get onto such network without the appropriate credentials).

--
Alan.
 
Old 08-20-2007, 01:22 PM   #10
mattydee
Member
 
Registered: Dec 2006
Location: Vancouver, BC
Distribution: Debian,Ubuntu,Slackware
Posts: 479

Rep: Reputation: 48
Quote:
Originally Posted by BCarey View Post
Okay, I was able to test it and it doesn't work. chmod u+s doesn't work either (well, it works from the cli, but not from wpa_gui). It seems like wpa_gui doesn't even try to drop the ip.

Brian
I was told this was a bad idea. Using sudo would be more secure if you want users to execute dhcpcd as root.

As for the dhcp thing, you might want to try wlassistant. I didn't really work for me, but...
 
Old 08-21-2007, 06:34 AM   #11
onebuck
Moderator
 
Registered: Jan 2005
Location: Central Florida 20 minutes from Disney World
Distribution: SlackwareŽ
Posts: 13,927
Blog Entries: 45

Rep: Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159
Hi,

You could search the LQ site or the LQ Slackware forum for some helpful information relative to this problem. A simple search on Slackware forum with the keys 'wlan change script' got several hits. This one has a old but applicable script. I think you could easily modify to your needs.

As I stated before that you will need a means to reset the device when you move between AP. If you are using 'KDE' then you can use the tools available.

What about the wpa_supplicant.conf config file? You could add the 'update_config=1' to the top of the file. Be sure to backup this file if you want to save anything within the original, comments or whatever.

You can add all the sites that you know you will be using therefore getting into the site without trouble. You could then use the modified script to access somewhere you roam into when not using a configured site.
 
Old 08-21-2007, 10:13 AM   #12
BCarey
Senior Member
 
Registered: Oct 2005
Location: New Mexico
Distribution: Slackware
Posts: 1,639

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by onebuck View Post
Hi,

What about the wpa_supplicant.conf config file? You could add the 'update_config=1' to the top of the file.
I tried this, but it did not seem to help (ie. it still doesn't release the ip).

Brian
 
Old 08-21-2007, 10:16 AM   #13
BCarey
Senior Member
 
Registered: Oct 2005
Location: New Mexico
Distribution: Slackware
Posts: 1,639

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by mattydee View Post
As for the dhcp thing, you might want to try wlassistant. I didn't really work for me, but...
I haven't tried this in a while because it didn't support WPA. Now it seems to,but I get an error message when trying to connect:
Code:
==>stderr: Failed to connect to wpa_supplicant - wpa_ctrl_open: No such file or directory
When searching for this error, all the posts I found seemed to relate this to not having wpa_supplicant installed, but I do and it is working.

Brian
 
Old 08-23-2007, 03:10 PM   #14
mattydee
Member
 
Registered: Dec 2006
Location: Vancouver, BC
Distribution: Debian,Ubuntu,Slackware
Posts: 479

Rep: Reputation: 48
I have the same problem. It seems to occur when running wlassistant with sudo. I think I came across something in the wpa_supplicant.conf file that might address this issue, but I haven't had a chance to mess around with it yet.

Meanwhile, running wlassistant as su works for me:
Code:
kdesu wlassistant

Last edited by mattydee; 08-23-2007 at 03:13 PM.
 
Old 08-23-2007, 04:21 PM   #15
BCarey
Senior Member
 
Registered: Oct 2005
Location: New Mexico
Distribution: Slackware
Posts: 1,639

Original Poster
Rep: Reputation: Disabled
Actually I was running it as root.

Brian
 
  


Reply


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
wpa_supplicant returns "no WPA/RSN IE" error, Fritz!WLAN usb ichrispa Linux - Software 1 07-20-2007 06:07 AM
wpa_supplicant confused on psk="secret password" gimmee Fedora 2 12-23-2006 05:05 AM
mambo: changing "Poll" to say "Encuesta" eantoranz Linux - Software 2 03-28-2006 11:35 AM
"wpa_supplicant and dhcpcd" known problems? the_mich Linux - Networking 0 03-13-2006 09:38 AM
wpa_supplicant "no suitable AP found." fatblueduck Linux - Wireless Networking 0 07-25-2005 07:36 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 11:48 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration