Announcement

Collapse
No announcement yet.

Wireles network without loging in

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Wireles network without loging in

    I just installed Kubuntu 10.10 and i am having problem with configuring wifi (infrastructure, WPA2-PSK). It is working when i am configuring it with knetworkmanager. However knetworkmanager does it only when user logs in, so it's impossible to ssh to the machine standing on login screen.

    I read numbers of instructions and tips on the net, and I have tried lots of different configurations of setting in /etc/interfaces and /etc/wpa_supplicant.conf files - none of them have worked. I also tried alternative program wicd - which despite identical configuration to knetworkmanager always said "Wrong password". Can anyone post a howto that is known to work on kubuntu 10.10 about setting up wifi (infrastructure, WPA2-PSK) so it connects whenever computer is on.

    #2
    Re: Wireles network without loging in

    It sounds like Knetworkmanager is faulty here since your network should come up when the machine boots whether you are logged in or not. On a Debian machine (which should work the same) I just put this in my /etc/network/interfaces file:
    auto wlan0
    iface wlan0 inet dhcp
    wpa-ssid mynetworkname
    wpa-psk mysecretpassphrase

    and I can log in remotely without having to log in locally. Do you have the "auto" directive? Also, put "static" instead of "dhcp" if you like.

    Comment


      #3
      Re: Wireles network without loging in

      My interfaces file:

      Code:
      auto lo
      iface lo inet loopback
      
      #auto eth0
      #iface eth0 inet dhcp
      
      auto wlan0
      iface wlan0 inet dhcp
        wpa-ssid XXX
        wpa-psk xxxxxxxxxxx

      And the reult is:
      Code:
      root@LAPTOP:~# /etc/init.d/networking restart
       * Reconfiguring network interfaces...                                                                       Ignoring unknown interface eth0=eth0.
      Internet Systems Consortium DHCP Client V3.1.3
      Copyright 2004-2009 Internet Systems Consortium.
      All rights reserved.
      For info, please visit [url]https://www.isc.org/software/dhcp/[/url]
      
      Listening on LPF/wlan0/00:60:b3:62:c6:63
      Sending on LPF/wlan0/00:60:b3:62:c6:63
      Sending on Socket/fallback
      DHCPREQUEST of 192.168.2.104 on wlan0 to 255.255.255.255 port 67                                                          
      DHCPREQUEST of 192.168.2.104 on wlan0 to 255.255.255.255 port 67                                                          
      DHCPREQUEST of 192.168.2.104 on wlan0 to 255.255.255.255 port 67                                                          
      DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 3                                                            
      DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 3                                                            
      DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 7                                                            
      DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 13
      DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 20
      DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 15
      No DHCPOFFERS received.
      Trying recorded lease 192.168.2.104
      PING 192.168.2.1 (192.168.2.1) 56(84) bytes of data.
      
      --- 192.168.2.1 ping statistics ---
      1 packets transmitted, 0 received, +1 errors, 100% packet loss, time 0ms
      
      No working leases in persistent database - sleeping.
      ssh stop/waiting
      ssh start/running, process 3845
      Shortly - no internet this way.

      Comment


        #4
        Re: Wireles network without loging in

        I don't know what's going on. It does sound like the network is not being initialized at the right point. Have you tried uninstalling Knetworkmanager? I'm not sure what the purpose of that program is since I don't run it, but I wouldn't be surprised if you can do better without it.



        Comment


          #5
          Re: Wireles network without loging in

          Have you tried SSL'ing into another account, one which does not have sudo capability?
          "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
          – John F. Kennedy, February 26, 1962.

          Comment


            #6
            Re: Wireles network without loging in

            Have you tried uninstalling Knetworkmanager?
            No, but i switched off autostart. Knetworkmanager is configuring network interfaces without any reference to /etc/network/interfaces file - it uses it's own data, and i noticed it works best when interfaces file doesn't mention given interface at all. It must use some magick trick though, cause with the same data vicd and standard configuration service doesn't work.

            Have you tried SSL'ing into another account, one which does not have sudo capability?
            You mean ssl-ing from remote machine to this one on non-sudo account? Yes i tried, and it didn't work. On kubuntu 10.10 login screen I switch to console screen and then "ifconfig wlan0" shows that there is no ip attached to interface - no suprise that it doesn't work - network is unconfigured. When I switch off autostart for knetworkmanager it stays this way after login.

            Comment


              #7
              Re: Wireles network without loging in

              Originally posted by j_kubik
              Knetworkmanager is configuring network interfaces without any reference to /etc/network/interfaces file - it uses it's own data, and i noticed it works best when interfaces file doesn't mention given interface at all. It must use some magick trick though, cause with the same data vicd and standard configuration service doesn't work.
              I had no idea it was that bad! Actually I am speechless. It does sound like in your case you have more than enough savvy to do without Knetworkmanger. Besides, if it makes your network dysfunctional then is it really that important to have it? I notice that many people report that their problems go away when Knetworkmanger is removed. Perhaps try wicd.




              Comment


                #8
                Re: Wireles network without loging in

                Besides, if it makes your network dysfunctional then is it really that important to have it?
                It must use some magick trick though, cause with the same data vicd and standard configuration service doesn't work.
                I don't think it's making network disfunctional - in fact it is the only way i found to make it work. The only problem is that knetworkmanager will not work when no user is logged on, as it's a windowing program, and i don't want to create backround X session (eg. Xvfb) just for configuring network.
                I doubt that knetworkmanager is messing with network when i switch autostart off - however i will try to uninstall it.

                EDIT:

                I uninstalled knetworkmanger andit didn't help - i also lost the only way to get any wireles internet at all, so i had some problems installing it back Anyway I also learned, that even cable LAN interface (eth0) isnot working with normal configuration - i checked and knetworkmanager was able to make it work - but i have no idea how...

                I also noticed that without knetworkmanager every few seconds i get following entries in logs

                /var/log/syslog

                Code:
                Oct 24 17:43:21 LAPTOP avahi-autoipd(wlan0)[2621]: Successfully claimed IP address 169.254.8.244
                Oct 24 17:43:21 LAPTOP dhclient: No working leases in persistent database - sleeping.
                Oct 24 17:43:22 LAPTOP wpa_supplicant[1599]: Trying to associate with 00:1a:4f:10:63:ff (SSID='WLAN-LR' freq=2462 MHz)
                Oct 24 17:43:22 LAPTOP kernel: [ 5431.771014] wlan0: authenticate with 00:1a:4f:10:63:ff (try 1)
                Oct 24 17:43:22 LAPTOP kernel: [ 5431.772889] wlan0: authenticated
                Oct 24 17:43:22 LAPTOP kernel: [ 5431.772929] wlan0: associate with 00:1a:4f:10:63:ff (try 1)
                Oct 24 17:43:22 LAPTOP kernel: [ 5431.775999] wlan0: RX AssocResp from 00:1a:4f:10:63:ff (capab=0x411 status=0 aid=1)
                Oct 24 17:43:22 LAPTOP kernel: [ 5431.776040] wlan0: associated
                Oct 24 17:43:22 LAPTOP wpa_supplicant[1599]: Associated with 00:1a:4f:10:63:ff
                Oct 24 17:43:22 LAPTOP wpa_supplicant[931]: No network configuration found for the current AP
                Oct 24 17:43:22 LAPTOP wpa_supplicant[1599]: WPA: 4-Way Handshake failed - pre-shared key may be incorrect
                Oct 24 17:43:22 LAPTOP wpa_supplicant[931]: CTRL-EVENT-DISCONNECTED - Disconnect event - remove keys
                Oct 24 17:43:22 LAPTOP wpa_supplicant[1599]: CTRL-EVENT-DISCONNECTED - Disconnect event - remove keys
                Oct 24 17:43:22 LAPTOP kernel: [ 5431.789158] wlan0: deauthenticating from 00:1a:4f:10:63:ff by local choice (reason=3)
                Oct 24 17:43:22 LAPTOP kernel: [ 5431.789494] cfg80211: All devices are disconnected, going to restore regulatory settings
                Oct 24 17:43:22 LAPTOP kernel: [ 5431.789506] cfg80211: Restoring regulatory settings
                Oct 24 17:43:22 LAPTOP kernel: [ 5431.789515] cfg80211: Calling CRDA to update world regulatory domain
                Oct 24 17:43:22 LAPTOP kernel: [ 5431.799306] cfg80211: World regulatory domain updated:
                Oct 24 17:43:22 LAPTOP kernel: [ 5431.799316]   (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
                Oct 24 17:43:22 LAPTOP kernel: [ 5431.799325]   (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
                Oct 24 17:43:22 LAPTOP kernel: [ 5431.799333]   (2457000 KHz - 2482000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
                Oct 24 17:43:22 LAPTOP kernel: [ 5431.799341]   (2474000 KHz - 2494000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
                Oct 24 17:43:22 LAPTOP kernel: [ 5431.799349]   (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
                Oct 24 17:43:22 LAPTOP kernel: [ 5431.799357]   (5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
                /var/log/messages
                Code:
                Oct 24 17:43:09 LAPTOP kernel: [ 5419.001522] cfg80211: Calling CRDA to update world regulatory domain
                Oct 24 17:43:09 LAPTOP kernel: [ 5419.011789] cfg80211: World regulatory domain updated:
                Oct 24 17:43:09 LAPTOP kernel: [ 5419.011798]   (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
                Oct 24 17:43:09 LAPTOP kernel: [ 5419.011808]   (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
                Oct 24 17:43:09 LAPTOP kernel: [ 5419.011816]   (2457000 KHz - 2482000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
                Oct 24 17:43:09 LAPTOP kernel: [ 5419.011824]   (2474000 KHz - 2494000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
                Oct 24 17:43:09 LAPTOP kernel: [ 5419.011832]   (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
                Oct 24 17:43:09 LAPTOP kernel: [ 5419.011840]   (5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
                /var/log/kern.log

                Code:
                Oct 24 17:43:39 LAPTOP kernel: [ 5449.014793] wlan0: authenticate with 00:1a:4f:10:63:ff (try 1)
                Oct 24 17:43:39 LAPTOP kernel: [ 5449.016792] wlan0: authenticated
                Oct 24 17:43:39 LAPTOP kernel: [ 5449.016836] wlan0: associate with 00:1a:4f:10:63:ff (try 1)
                Oct 24 17:43:39 LAPTOP kernel: [ 5449.020531] wlan0: RX AssocResp from 00:1a:4f:10:63:ff (capab=0x411 status=0 aid=1)
                Oct 24 17:43:39 LAPTOP kernel: [ 5449.020540] wlan0: associated
                Oct 24 17:43:39 LAPTOP kernel: [ 5449.029138] wlan0: deauthenticating from 00:1a:4f:10:63:ff by local choice (reason=3)
                Oct 24 17:43:39 LAPTOP kernel: [ 5449.029475] cfg80211: All devices are disconnected, going to restore regulatory settings
                Oct 24 17:43:39 LAPTOP kernel: [ 5449.029485] cfg80211: Restoring regulatory settings
                Oct 24 17:43:39 LAPTOP kernel: [ 5449.029494] cfg80211: Calling CRDA to update world regulatory domain
                Oct 24 17:43:39 LAPTOP kernel: [ 5449.039593] cfg80211: World regulatory domain updated:
                Oct 24 17:43:39 LAPTOP kernel: [ 5449.039603]   (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
                Oct 24 17:43:39 LAPTOP kernel: [ 5449.039612]   (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
                Oct 24 17:43:39 LAPTOP kernel: [ 5449.039620]   (2457000 KHz - 2482000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
                Oct 24 17:43:39 LAPTOP kernel: [ 5449.039628]   (2474000 KHz - 2494000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
                Oct 24 17:43:39 LAPTOP kernel: [ 5449.039636]   (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
                Oct 24 17:43:39 LAPTOP kernel: [ 5449.039644]   (5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
                I noticed a line about failed 4 way handshake, so i doublechecked preshared key, and (from wpa supplicant manpage) run

                Code:
                wpa_supplicant -c/etc/wpa_supplicant/wpa_supplicant.conf -iwlan0 -d &> log
                I added generated log to this post. Particulary interesting line is "Added BSSID 00:1a:4f:10:63:ff into blacklist". Since that's my router, i am guessing that before that something happens that makes problem - no idea what it is.
                Attached Files

                Comment


                  #9
                  Re: Wireles network without loging in

                  Repeating once again - wicd doesn't work - says bad password, but it's the same as in knetworkmanager. The only way to get wireles working by now is knetworkmanager. My question is "why might it happen and what to do about it?"

                  Comment


                    #10
                    Re: Wireles network without loging in

                    Wicd give you that "bad password" because not all of the KNetworkManger files have been removed.
                    A link to a post explaning how to fix the "bad password" problem is here, except I should have put the step installing the wicd apps BEFORE the step which removes ALL of the KNetworkManager apps, to avoid losing your ability to create a wireless connection. (IF you have an ethernet cable long enough to reach from the back of your wireless to your PC's eth port you can use that instead.)

                    The IP that got locked onto, 169.254.8.244, is Comcast's "Link Local" block:
                    Code:
                    NetRange:    169.254.0.0 - 169.254.255.255
                    CIDR:      169.254.0.0/16
                    OriginAS:    
                    NetName:    LINKLOCAL-RFC3927-IANA-RESERVED
                    NetHandle:   NET-169-254-0-0-1
                    Parent:     NET-169-0-0-0-0
                    NetType:    IANA Special Use
                    NameServer:   BLACKHOLE-1.IANA.ORG
                    NameServer:   BLACKHOLE-2.IANA.ORG
                    Comment:    This is the "link local" block. It was set
                    Comment:    aside for this special use in the Standards           
                    Comment:    Track document, RFC 3927 and was further
                    Comment:    documented in the Best Current Practice
                    Comment:    RFC 5735, which can be found at:
                    Comment:    [url]http://www.rfc-editor.org/rfc/rfc3927.txt[/url]
                    Comment:    [url]http://www.rfc-editor.org/rfc/rfc5735.txt[/url]
                    Comment:    It is allocated for communication between hosts           
                    Comment:    on a single link. Hosts obtain these addresses           
                    Comment:    by auto-configuration, such as when a DHCP           
                    Comment:    server cannot be found.
                    Comment:    A router MUST NOT forward a packet with an IPv4           
                    Comment:    Link-Local source or destination address,           
                    Comment:    irrespective of the router's default route configuration           
                    Comment:    or routes obtained from dynamic routing protocols.           
                    Comment:    A router which receives a packet with an IPv4           
                    Comment:    Link-Local source or destination address MUST NOT           
                    Comment:    forward the packet. This prevents forwarding of           
                    Comment:    packets back onto the network segment from which           
                    Comment:    they originated, or to any other segment.
                    RegDate:    1998-01-27
                    Updated:    2010-03-15
                    Ref:      [url]http://whois.arin.net/rest/net/NET-169-254-0-0-1[/url]

                    "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
                    – John F. Kennedy, February 26, 1962.

                    Comment


                      #11
                      Re: Wireles network without loging in

                      Here's a suggestion. I don't know if this would solve your problem. Uninstall networkmanager & knetwrkmanager. And install wicd & related dependencies & wicd-curses.

                      Configure wicd to work & connect to your preferred connection automatically. Now, you'll have to look up how to have a program start during startup. Have wicd-curses start during startup.

                      I'm not going to guarantee that this will work but wicd-curses will work from the command line when booting into recovery mode.

                      I'd be curious to know if this works.

                      tim

                      Comment


                        #12
                        Re: Wireles network without loging in

                        Originally posted by Bob Kowalski
                        Here's a suggestion. I don't know if this would solve your problem. Uninstall networkmanager & knetwrkmanager. And install wicd & related dependencies & wicd-curses.
                        But not before installing "wicd & related dependencies & wicd-curses"!
                        Windows no longer obstructs my view.
                        Using Kubuntu Linux since March 23, 2007.
                        "It is a capital mistake to theorize before one has data." - Sherlock Holmes

                        Comment


                          #13
                          Re: Wireles network without loging in

                          yeah, I forget that not everyone has learned the hard way like I did: read the recommendations/instructions all the waaaaaay to the end before following them.

                          Comment


                            #14
                            Re: Wireles network without loging in

                            Originally posted by GreyGeek
                            A link to a post explaning how to fix the "bad password" problem is here
                            - purged all mentioned packages (not all of them were present though)
                            - installed wicd & freinds
                            - rebooted
                            - configured wicd again (old config was still present - hope it's not a problem...)
                            - effect: bad password

                            Can anyone tell me which files are causnig problems, not which packages? perhaps some rouge files surviwe purging those packages? i can search for them manually... or perhaps some other packages cause problems in maverick? (the instruction is for lucid).

                            Comment


                              #15
                              Re: Wireles network without loging in

                              uninstall any package with "networkmanager" or "knm" in its name.

                              Restart the network service or reboot.
                              "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
                              – John F. Kennedy, February 26, 1962.

                              Comment

                              Working...
                              X