LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking > Linux - Wireless Networking
User Name
Password
Linux - Wireless Networking This forum is for the discussion of wireless networking in Linux.

Notices


Reply
  Search this Thread
Old 03-04-2007, 02:09 AM   #1
dmravaet
LQ Newbie
 
Registered: Nov 2005
Location: A very cold place
Distribution: Debian, Ubuntu, DSL
Posts: 15

Rep: Reputation: 0
Network Manager won't remember WAP settings in Ubuntu


Well, to give some background, I set my computer-illiterate mother up with a Dell E1405 running Ubuntu, and after hours upon hours of trying to integrate information from several different forums (using ndiswrapper, dell's proprietary drivers, and wpa_supplicant), I was finally able to connect it to our WAP. Said WAP uses WPA encryption and does not broadcast its SSID.

Unfortunately, Network Manager will not retain the WAP settings after a reboot. I'm still something of a newbie as far as Linux is concerned, and am not quite sure how to set up a script to automatically connect, as I can't seem to connect through iwconfig.

I'm not sure what other information would be relevant, but if there's anything that could help someone to help me figure this out, let me know and I'll get it ASAP. Thanks!
 
Old 03-04-2007, 06:05 AM   #2
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Fedora38
Posts: 6,147

Rep: Reputation: 435Reputation: 435Reputation: 435Reputation: 435Reputation: 435
I never had much luck with the GUI tools. And I do not need to use ndiswrapper as my wireless chip is suported by the kernel.
But I can make my wireless network connect at boot, with this in my /etc/network/interfaces file:
Quote:
# This defines the usual loopback interface
auto lo
iface lo inet loopback
address 127.0.0.1
netmask 255.0.0.0

# eth1 is my wireless interface, and I want it brought up at boot
auto eth1
# I like a static IP, replace "static" with "dhcp"
# if you want to be allocated a dynamic IP by your router
iface eth1 inet static
# This is the broadcast address for my network, yours may be different
broadcast 10.255.255.255
# This is the static IP I want on my LAN
# miss the next line out if you are using DHCP
address 10.0.0.8
# This is the netmask for my network, yours may be different
netmask 255.0.0.0
# This is the IP of my router, yours may be different
gateway 10.0.0.2
# This is my WPA Passphrase, yours will be different
wpa-passphrase Itsasecret
# This is the SSID of my wireless AP, you'll need this
# even if your AP isn't broadcasting its name
wpa-ssid Whatitscalled
# This is the channel my AP is working on
wireless-channel 11
I boot, it connects. Easy. Hope this solves your problem.
 
Old 03-05-2007, 10:11 PM   #3
dmravaet
LQ Newbie
 
Registered: Nov 2005
Location: A very cold place
Distribution: Debian, Ubuntu, DSL
Posts: 15

Original Poster
Rep: Reputation: 0
Tredegar - I know that that should work, but for some reason it doesn't. I'd tried entering the configuration into /etc/network/interfaces before, but it didn't work then. I tried it again using your guide, but that didn't work, either.

It seems that if there is any entry at all for my wireless adapter (also eth1) in /etc/network/interfaces, the NetworkManager applet won't even see it. As for trying to work without NetworkManager, I can connect without any encryption (even WEP won't work), and this only works if I have the WAP broadcasting its SSID - not really the way I want to go.

Thanks though.
 
Old 03-05-2007, 10:36 PM   #4
Quakeboy02
Senior Member
 
Registered: Nov 2006
Distribution: Debian Linux 11 (Bullseye)
Posts: 3,407

Rep: Reputation: 141Reputation: 141
"Unfortunately, Network Manager will not retain the WAP settings after a reboot."

Could it just be that you didn't save your session properties before you logged off?
 
Old 03-06-2007, 01:32 AM   #5
dmravaet
LQ Newbie
 
Registered: Nov 2005
Location: A very cold place
Distribution: Debian, Ubuntu, DSL
Posts: 15

Original Poster
Rep: Reputation: 0
Quake - I'm not quite sure what you mean by saving my session properties. In which would I save these properties: Network Manager or what? And how would I go about doing this?

It's probably the dumbest thing, something right under my nose, but I genuinely don't know.
 
Old 03-06-2007, 05:11 AM   #6
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Fedora38
Posts: 6,147

Rep: Reputation: 435Reputation: 435Reputation: 435Reputation: 435Reputation: 435
Quote:
I can connect without any encryption (even WEP won't work)
....Then there is something going wrong with your encryption / authentication.

Make sure you have wpa_supplicant installed. Other packages I have installed and you may need are:

libiw28
kwlan (but I can't make this work)
wpagui (but I can't make this work either!)
wireless-tools
wlassistant (most of the time, this is not a helpful piece of software!)

Give your AP/Router a name (SSID) and make sure it is set to use WPA-PSK (Pre-Shared-Key) encryption and enter a passphrase for WPA-PSK into your Ap/Router. My passphrase has no spaces.
Make sure it is broadcasting its name (this is harmless). Make sure you know the channel it is using.

Edit your /etc/network/interfaces as in my post #2 above.
sudo ifdown eth1
sudo ifup eth1

You should be connected. If you are still having trouble, please post the contents of /etc/network/interfaces, the output of ifconfig and the IP address of your router/AP

I do not understand why you are having trouble - I have set up two different laptops like this, both with kubuntu 6.06.1, and they worked straight away.
 
Old 03-06-2007, 11:13 AM   #7
Quakeboy02
Senior Member
 
Registered: Nov 2006
Distribution: Debian Linux 11 (Bullseye)
Posts: 3,407

Rep: Reputation: 141Reputation: 141
"I was finally able to connect it to our WAP. Said WAP uses WPA encryption and does not broadcast its SSID.

Unfortunately, Network Manager will not retain the WAP settings after a reboot."

Tredegar, if I understand this correctly, he is able to connect WPA, so that means that all the software is installed and loaded.

The way I understand this is that he configures the network manager, it connects and works, but when he reboots the configuration is wrong.

Dmravaet,
If you're a KDE user, then I can't help you. Under Gnome, click Desktop->Preferences->Sessions->Save the current session. There should be a radio button for you to always save the session, as well. A lot of people first encounter session management when their sound disappears everytime they reboot.
 
Old 03-06-2007, 01:44 PM   #8
dmravaet
LQ Newbie
 
Registered: Nov 2005
Location: A very cold place
Distribution: Debian, Ubuntu, DSL
Posts: 15

Original Poster
Rep: Reputation: 0
Quake - exactly. I do have everything installed, but can only connect using WPA through network manager's UI. If I want to connect through the command line or automatically through /etc/network/interfaces, I have to turn off all encryption and have it broadcast its SSID. I've tried every conceivable combination already, and do not want to toy around with my WAP's settings anymore, now that I can at least connect to it using the settings I want.

That I prevent my WAP from broadcasting its SSID should be irrelevant anyway (at least, in my own little world). I know what it is, I know what channel it's broadcasting on, I know the WPA key, and I know how to get the passkey itself through the command line, and have tried that, too. I also know firsthand how easy it is for a script-kiddie to break WEP or WPA if the SSID is known, so I'd prefer to stay away from that if possible. I'm a Linux newbie, relatively speaking, but I've been working with computers since I was about five, so I've worked with networking, both wired and wireless, many times before.

As for saving sessions, I am using Gnome. I remember trying something similar, through the System menu, but I'll give this a shot and post back. Thanks!
 
Old 03-06-2007, 02:55 PM   #9
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Fedora38
Posts: 6,147

Rep: Reputation: 435Reputation: 435Reputation: 435Reputation: 435Reputation: 435
@Quakeboy02:

You are right about installed software - dmravaet seems to have the required resources.

But dmravaet wants to connect wirelessly at boot, and this means a CLI / script fix, not a GUI fix. "Saving sessions", just keeps windows open in my experience, and yes, I too have answered many threads about "Why do I get all these things starting up when I login, why won't they go away?". I wish the clever guys would set the default to "Start with an empty session". Give it time... . . . . !

@dmravaet:
I have been doing some testing.....

If I set my AP not to broadcast its SSID, then the /etc/network/interfaces setup I gave you does not work, and will not connect, even if I comment out the line
wpa-ssid Whatitscalled
[I didn't try setting it to wpa-ssid Hidden, but it's late at night for me.]

I don't mind my AP broadcasting its name, because my security is set with WPA, which seems to be quite robust (compared to weak WEP, please correct me if I am mistaken here). It also seems to me that my laptop, when it is trying to bring the wireless connection up, needs to know which AP to associate with. How can it do this if the available APs are not named? It would have to try all of them, attempt WPA negociation, try again etc. It seems more sensible to name it, and then let WPA sort out the security.

My additional level of "security", is that I have set my wireless AP so that it will only begin to consider allowing connections from certain MAC addresses (like the MAC of my wireless laptop). I don't think there are many people within wireless range who know both how to spoof a MAC address (they're probably running windows) and crack WAP.

Besides, most of my neighbours are running completely open networks - easier fishing there.

So, please, try enabling "Broadcast SSID" in your router / AP, and try my interfaces setup again. I hope you'll find that it works.
 
Old 03-06-2007, 03:14 PM   #10
Quakeboy02
Senior Member
 
Registered: Nov 2006
Distribution: Debian Linux 11 (Bullseye)
Posts: 3,407

Rep: Reputation: 141Reputation: 141
I've never tried using a hidden ESSID. I didn't like the network manager GUI. To be blunt, it's a nice thing for a traveling laptop, but it's a real POS for a desktop if there are multiple APs in the area. I did try it once, and it kept trying to disconnect me and reconnect me to random APs through the day. I uninstalled it and made it and its problems go away. My script to get WPA working consisted simply of creating a wpa_supplicant.conf from the output of wpa_passphrase, and then running wpa_supplicant from the interfaces file as follows:
Code:
auto ath0
iface ath0 inet dhcp
        pre-up /sbin/wpa_supplicant -Bw -Dwext -c/etc/wpa_supplicant.conf -iath0
 
Old 03-07-2007, 12:35 AM   #11
dmravaet
LQ Newbie
 
Registered: Nov 2005
Location: A very cold place
Distribution: Debian, Ubuntu, DSL
Posts: 15

Original Poster
Rep: Reputation: 0
Edit: *accidental duplicate post deleted*

Last edited by dmravaet; 03-07-2007 at 12:38 AM.
 
Old 03-07-2007, 12:37 AM   #12
dmravaet
LQ Newbie
 
Registered: Nov 2005
Location: A very cold place
Distribution: Debian, Ubuntu, DSL
Posts: 15

Original Poster
Rep: Reputation: 0
Quake - nothing saved as far as the wlan is concerned. Matter of fact, it had already been set to auto-save.

Tredegar - I tried MAC filtering several nights ago - didn't play nice either, but I didn't try it with SSID broadcasting on, so I'll give that a shot and hope it works.

Thanks for your help, both of you - I'm extremely grateful.

*crosses fingers* Wish me luck, guys.
 
Old 03-07-2007, 01:53 AM   #13
dmravaet
LQ Newbie
 
Registered: Nov 2005
Location: A very cold place
Distribution: Debian, Ubuntu, DSL
Posts: 15

Original Poster
Rep: Reputation: 0
ser·en·dip·i·ty
1. an aptitude for making desirable discoveries by accident.
2. good fortune; luck
3. trying vainly and repeatedly to find a script/CLI fix, and unwittingly fixing it through the GUI in the process.

Apparently, it will automatically connect provided the SSID is broadcast, and suddenly it's playing nice with the MAC filter as well.

@tredegar

"I don't mind my AP broadcasting its name, because my security is set with WPA, which seems to be quite robust (compared to weak WEP, please correct me if I am mistaken here)."

The reason I'd rather my SSID not be broadcast is it just makes it that much easier to break, not that it isn't relatively easy as it is - WPA-PSK, while much more secure than WEP, can be cracked relatively easily (http://docs.lucidinteractive.ca/inde...less_Networks). WPA-RADIUS and WPA2 seem to be much more effective, so I'll probably look into that, but in the meantime, we'll just have to operate under the assumption that anything transmitted or received could be intercepted (probably a good rule of thumb regardless).

Anyways, tredegar, quake: THANKS. You may not have solved the problem perfectly, but you've been a tremendous help nonetheless.
 
Old 03-07-2007, 12:44 PM   #14
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Fedora38
Posts: 6,147

Rep: Reputation: 435Reputation: 435Reputation: 435Reputation: 435Reputation: 435
Thanks for the update, though I'm not clear whether you are now connecting with a CLI script, or a GUI.

It seems that the current set of linux wireless tools will not allow authentication with an AP that is not broadcasting its SSID. I expect this relatively minor bug will be fixed sometime.

I am hoping that WPA-PSK is fairly secure (the link you gave in the post above (#13) is currently dead by the way: "(There is currently no text in this page)".

Quote:
... we'll just have to operate under the assumption that anything transmitted or received could be intercepted
Very true.

Anyway, glad you got it working at last!
 
Old 03-07-2007, 02:00 PM   #15
dmravaet
LQ Newbie
 
Registered: Nov 2005
Location: A very cold place
Distribution: Debian, Ubuntu, DSL
Posts: 15

Original Poster
Rep: Reputation: 0
I'm connecting through the GUI - works automatically as long as SSID is broadcasting. Couldn't get it working through CLI/script. If I even make a mention of eth1 in /etc/network/interfaces, I can't connect, but since I've fixed it through the GUI, that's good enough for now.

As for the link being dead, it's not, it just took on the end parenthesis by mistake, so here it is again, as it should appear.

http://docs.lucidinteractive.ca/inde...eless_Networks
 
  


Reply



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
Network settings in Ubuntu BobNutfield Ubuntu 1 03-05-2006 10:10 PM
Ubuntu: Network Settings -> Location General_Tso Ubuntu 0 04-18-2005 04:54 PM
KDE doesn't remember sound settings DaFrEQ Linux - Software 4 10-17-2004 08:34 PM
KDE does not remember settings mooreted Linux - Software 0 02-16-2004 03:53 PM
ALSAmixer does not remember settings? Pwcca Linux - Software 3 08-05-2003 05:29 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking > Linux - Wireless Networking

All times are GMT -5. The time now is 01:30 AM.

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