Fedora Linux Support Community & Resources Center
  #1  
Old 19th November 2007, 06:54 PM
ivlad Offline
Registered User
 
Join Date: Dec 2005
Posts: 13
wireless without NetworkManager?

Summary:

Right now I use NetworkManager to manually connect to my WPA-encrypted network, but I want the connection to be done automatically at boot time. Can anyone please help? Thank you. Details below:

Current setup:

I have a Dell Inspiron laptop with Fedora 7 64-bit, and a 32-bit desktop PC, also with F7. I run KDE on both of them, and the whole story below is similar for both. Right now, I connect to wireless using NetworkManager in the manner recommended by Fedora Unity . Basically I used system-config-network to have wlan0 not start on boot and ordered NetworkManager and NetworkManagerDispatcher to start instead. Then, I have to right click on the NetworkManager icon in the systray, select my network, watch it connect, watch it invariably disconnect, order it to connect again, this time finally works. During a whole-afternoon work session it will fail two or three times, will have to use knetworkmanager to reconnect again.

This state of things is unacceptable because:
  1. I am hoping to convert my wife to Linux, so wireless should Just Work, like in Windows;
  2. Before I moved to this new apartment which has wireless, I had Ethernet. I had ntpd get the computer time from the time servers, but apparently it was doing this at boot time. Now that it cannot connect at boot time, my computer clock is quite late.
  3. It is just a hassle to have to do this every time when I just want it to connect to my network only.

I want the machine to connect to my WPA network, and to it only, and to do it automatically at boot time, and to not disconnect at random like it does now (Windows does not do that, so it is not an issue with the access point or with interference). I want that for the laptop as well -- it is quite heavy, so it stays home as a desktop replacement machine running Windows, with occasional dual-boot to Linux when I take it to work, where I do not have wi-fi. I only mentioned the laptop because I wanted to make the point that the same behavior occurs on different hardware, but same up-to-date F7.

Of course I had wlan0 activate at startup and try to play with settings in system-config-network to get an automatic boot connection working, but it did not work.

Thank you,
I. Vlad
Reply With Quote
  #2  
Old 19th November 2007, 08:23 PM
Iron_Mike Offline
Registered User
 
Join Date: Jul 2005
Location: Ft Huachuca, AZ
Posts: 3,772
If using NetworkManager, you will not need the "activate on boot" box checked in the interface configuration gui. But you will need to check the box for "allow users to enable/disable device" NM will automatically start or stop the interface. You can automate the login for the default gnome-keyring, BUT the keyring password AND the users login password must be the same. A program called "pam_keyring" must be installed and a file has to be edited. Do a search on the forum here for "automate keyring"


Still sleeping, I thought you had F8, With f7 just do a search here for automate the keyring. As mentioned above the same info is correct EXCEPT removing NM and reinstalling Fedora 7.90 versions. Install the pam_keyring file, make sure the keyring and login password are the same and edit this file:

/etc/pam.d/gdm

Make it like this...

#%PAM-1.0
auth [success=done ignore=ignore default=bad] pam_selinux_permit.so
auth required pam_env.so
auth optional pam_keyring.so try_first_pass
auth include system-auth
auth optional pam_gnome_keyring.so
account required pam_nologin.so
account include system-auth
password include system-auth
session required pam_selinux.so close
session include system-auth
session required pam_loginuid.so
session optional pam_console.so
session required pam_selinux.so open
session optional pam_keyinit.so force revoke
session required pam_namespace.so
session optional pam_gnome_keyring.so auto_start
session optional pam_keyring.so

Last edited by Iron_Mike; 19th November 2007 at 11:11 PM.
Reply With Quote
  #3  
Old 19th November 2007, 10:42 PM
Brian1 Offline
Registered User
 
Join Date: Nov 2004
Location: Seymour, Indiana
Posts: 2,509
To make it the only connection follow the info below the -========================= line.
Being F7 and probably the newest ndiswrapper that should be the correct line for wpa_supplicant.
I assume you have wpa_supplicant setup like in the above post in that link.
If not you need to create your passphrase to add. Check this link on doing that.
http://ndiswrapper.sourceforge.net/j...mid,33/id,wpa/
Note WPA and WPA2 are configured differently in wpa_supplicant.conf file.

Brian
__________________
Distribution: RHEL 5.1 with Pieces of this and that.
Kernel 2.6.23.9, KDE 3.5.8 and KDE 4.0 beta, Plus Development src.rpm, ATI fglrx64_7_1_0-8.433-1 rpm with 3D and DRI working.
Acer 5100-5840 with webcam, ati, sdcard reader, sound, atheros based wireless, all working. Only thing not working is the memory stick reader.
Reply With Quote
  #4  
Old 19th November 2007, 11:18 PM
Iron_Mike Offline
Registered User
 
Join Date: Jul 2005
Location: Ft Huachuca, AZ
Posts: 3,772
OK after rereading your post, I noticed you're running KDE, you have Both the NetworkManager services enabled. Do a yum install knetworkmanager.
Check your kwallet which is the KDE equivalent to the gnome keyring. To automate the opening closing of kwallet, leave the default password for kwallet blank.
Reply With Quote
  #5  
Old 20th November 2007, 11:57 PM
ivlad Offline
Registered User
 
Join Date: Dec 2005
Posts: 13
The only wallet application I found in KDE was from K Menu... Settings... Wallet management tool. Clicked that, and a yellowish icon appears in the systray. What am I supposed to check it for? I clicked on File... New Wallet and nothing happened. Clicked on Settings... configure wallet... I see no place for a default password for the whole application.

I read about pam_keyring with yum info pam_keyring, and it says that it allows Gnome users to do something, so it seems it is not for me unfortunately.
Reply With Quote
  #6  
Old 21st November 2007, 12:00 AM
ivlad Offline
Registered User
 
Join Date: Dec 2005
Posts: 13
My previous reply was for Iron_Mike. This one for Brian1: I did not find any line made of == signs everywhere. Are you talking about something in /etc/pam.d/gdm ? I do not have that because it seems pam_keyring is for Gnome and I have kde.
Reply With Quote
  #7  
Old 21st November 2007, 01:05 AM
Brian1 Offline
Registered User
 
Join Date: Nov 2004
Location: Seymour, Indiana
Posts: 2,509
Sorry forgot to include this post where the ============== line is in it. post #4.
http://www.linuxquestions.org/questi...nd-wpa-600464/

Brian
__________________
Distribution: RHEL 5.1 with Pieces of this and that.
Kernel 2.6.23.9, KDE 3.5.8 and KDE 4.0 beta, Plus Development src.rpm, ATI fglrx64_7_1_0-8.433-1 rpm with 3D and DRI working.
Acer 5100-5840 with webcam, ati, sdcard reader, sound, atheros based wireless, all working. Only thing not working is the memory stick reader.
Reply With Quote
  #8  
Old 21st November 2007, 02:05 AM
Iron_Mike Offline
Registered User
 
Join Date: Jul 2005
Location: Ft Huachuca, AZ
Posts: 3,772
Quote:
Originally Posted by ivlad
The only wallet application I found in KDE was from K Menu... Settings... Wallet management tool. Clicked that, and a yellowish icon appears in the systray. What am I supposed to check it for? I clicked on File... New Wallet and nothing happened. Clicked on Settings... configure wallet... I see no place for a default password for the whole application.

I read about pam_keyring with yum info pam_keyring, and it says that it allows Gnome users to do something, so it seems it is not for me unfortunately.
The Fedora 8 version of KDE is using the gnome network applet and ALSO the gnome keyring so things have changed. KDE is using the gnome-keyring package instead of Kwallet. So you might see the screen asking for the "default gnome keyring" password.

When you connect to a secured network, it should first ask for the "default keyring password" then ask for the "key" if this is the first time connecting to a secured network....
Reply With Quote
  #9  
Old 21st November 2007, 03:24 AM
padgett Offline
Registered User
 
Join Date: Nov 2007
Posts: 8
Am new to Fedora but was getting constant "No such file..." errors on boot when wpa_supplicant loaded. (Would have been nice to say *what* file was not found). After a lot of experimentation I found that removing the "-u" (enable DBus control interface) from /etc/rc5.d/Sxxwpa_supplicant file resulted in everything working after boot..

What is DBus and why would I want it ?
Reply With Quote
  #10  
Old 21st November 2007, 01:11 PM
coyote2 Offline
Registered User
 
Join Date: Jul 2005
Posts: 13
Interesting. Will try it out next time.


Quote:
Originally Posted by Iron_Mike
If using NetworkManager, you will not need the "activate on boot" box checked in the interface configuration gui. But you will need to check the box for "allow users to enable/disable device" NM will automatically start or stop the interface. You can automate the login for the default gnome-keyring, BUT the keyring password AND the users login password must be the same. A program called "pam_keyring" must be installed and a file has to be edited. Do a search on the forum here for "automate keyring"


Still sleeping, I thought you had F8, With f7 just do a search here for automate the keyring. As mentioned above the same info is correct EXCEPT removing NM and reinstalling Fedora 7.90 versions. Install the pam_keyring file, make sure the keyring and login password are the same and edit this file:

/etc/pam.d/gdm

Make it like this...

#%PAM-1.0
auth [success=done ignore=ignore default=bad] pam_selinux_permit.so
auth required pam_env.so
auth optional pam_keyring.so try_first_pass
auth include system-auth
auth optional pam_gnome_keyring.so
account required pam_nologin.so
account include system-auth
password include system-auth
session required pam_selinux.so close
session include system-auth
session required pam_loginuid.so
session optional pam_console.so
session required pam_selinux.so open
session optional pam_keyinit.so force revoke
session required pam_namespace.so
session optional pam_gnome_keyring.so auto_start
session optional pam_keyring.so
Reply With Quote
  #11  
Old 21st November 2007, 04:55 PM
ivlad Offline
Registered User
 
Join Date: Dec 2005
Posts: 13
How to set up ifcfg-wlan0 for DHCP?

I only have F7, so I will have to wait until I update to F8 to try Iron_Mike's advice about pam_keyring. For now, I decided to try Brian1's advice. I did the following:

First, stopped NetworkManager. As root:

Code:
/sbin/service NetworkManager stop
/sbin/service NetworkManagerDispatcher stop
Also I made sure it will not start during boot:

Code:
/sbin/chkconfig NetworkManager off
/sbin/chkconfig NetworkManagerDispatcher off
I typed

Code:
rpm -qi wpa_supplicant
to find out whether this package is installed. I have version 0.5.7. I type:

Code:
wpa_passphrase my_ssid my_passphrase
where I replace the dummy arguments with my own values. I paste the output into /etc/wpa_supplicant/wpa_supplicant.conf , which becomes:

Code:
ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=wheel

network={
        ssid="my_ssid"
        scan_ssid=0
        proto=WPA
        key_mgmt=WPA-PSK
        #psk="my_passphrase"
        psk="df9832sd9238nx2n2we87w8s8f7wesghh84lkwerklkj3eg940348909fgdlj3498dlkj0"
        pairwise=TKIP
        group=TKIP
}
Note that: (1) the commented psk entry should be there, and should hold your password in clear; (2) the uncommented version I put here contains random junk, not my actual psk

I edit /etc/modprobe.conf to replace the line

Code:
alias wlan0 rt2500pci
with

Code:
alias wlan0 ndiswrapper
I tried to configure /etc/sysconfig/network-scripts/ifcfg-wlan0 for nic. In http://www.linuxquestions.org/questi...4/#post2964600 , Brian1 says "I assume setup as DHCP and ONBOOT=YES. If unsure what should be there, post the contents. If there is a ifcfg-eth0 then make sure it has ONBOOT=NO"

This is where I got stuck. I could figure out that I should set ONBOOT to YES, but I do not know to what actual values "setup as DHCP" corresponds. The contents of this file are:

Code:
# RaLink RT2500 802.11g Cardbus/mini-PCI
DEVICE=wlan0
ONBOOT=no
BOOTPROTO=dhcp
HWADDR=00:12:17:63:83:12
NETMASK=
DHCP_HOSTNAME=
IPADDR=
DOMAIN=
TYPE=Wireless
ESSID=
CHANNEL=1
MODE=Managed
RATE=Auto
USERCTL=yes
IPV6INIT=no
PEERDNS=yes
Can you please tell me what to values to plug in? Thank you.

This is the only thing left. According to Brian's 1 advice, I also added the line

Code:
wpa_supplicant -Dwext -iwlan0 -c/etc/wpa_supplicant.conf -dd
at the end of /etc/sysconfig/network-scripts/ifup-wireless , so all I really have to do is to find out what I have to put in /etc/sysconfig/network-scripts/ifcfg-wlan0 , then reboot the machine and watch it automatically connect to the network at boot.

So, can anyone please tell me what values to plug into /etc/sysconfig/network-scripts/ifcfg-wlan0 ?

Thank you,
I. Vlad
Reply With Quote
  #12  
Old 22nd November 2007, 12:27 AM
Brian1 Offline
Registered User
 
Join Date: Nov 2004
Location: Seymour, Indiana
Posts: 2,509
A bit busy but this may help you on the WPA for ifup-wireless.
Sorry I was thinking you was using ndiswrapper. Not used an rt2500pci type module so not sure what -D option should be. The -Dwext is for the newer ndiswrapper module.
Probably will have time tomorrow to help you out if you can't figure what the -D option should be for the rt2500 chipset.

Brian
__________________
Distribution: RHEL 5.1 with Pieces of this and that.
Kernel 2.6.23.9, KDE 3.5.8 and KDE 4.0 beta, Plus Development src.rpm, ATI fglrx64_7_1_0-8.433-1 rpm with 3D and DRI working.
Acer 5100-5840 with webcam, ati, sdcard reader, sound, atheros based wireless, all working. Only thing not working is the memory stick reader.
Reply With Quote
  #13  
Old 29th November 2007, 04:45 AM
padgett Offline
Registered User
 
Join Date: Nov 2007
Posts: 8
My wireless is a RT2561/RT61 (PCI) and it uses wext
Reply With Quote
  #14  
Old 30th November 2007, 01:01 AM
padgett Offline
Registered User
 
Join Date: Nov 2007
Posts: 8
Lots of fun today. First my latest update left no X and had to reinstall the NVIDIA 64 drivers. Next the update restored the Sxxwpa_supplicant in /etc/rc5.d to the original configuration which does not work on boot. Replacing $INTERFACES $DRIVERS...-u -f with -DWEXT -iwlan0...-f restored activation during boot. Does this happen every time the kernel updates ? (now .49)

ps tried NetManager briefly but wireless kept disconnecting/reconnecting. Stopped the service and connection is stable again. Any idea why ?
Reply With Quote
Reply

Tags
networkmanager, wireless

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
NetworkManager (Wireless) gripe Jongi Alpha, Beta & Snapshots Discussions (Fedora 11 Only) 6 29th April 2009 01:53 AM
NetworkManager and wireless daviddoria Alpha, Beta & Snapshots Discussions (Fedora 10 Only) 12 29th October 2008 01:55 AM
Wireless only works with networkmanager coreno Servers & Networking 3 18th January 2008 06:21 PM
What exactly is NetworkManager and why do I need it with wireless extendedping Servers & Networking 1 5th January 2007 05:37 AM


Current GMT-time: 23:02 (Friday, 25-07-2014)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat