[mythtv-users] HowTo avoid password nagging

Karl Reichert Karl-Trampe at gmx.de
Mon Dec 10 13:12:22 UTC 2007


> > > hmm...
> > > 
> > > The problem with that statement is that network manager does
> > > absolutely
> > > no WPA on its own. It relies entirely on wpasupplicant for this.
> > > 
> > > So, if network manager works, wpasupplicant works.
> > > Then /etc/network/interfaces should work.
> > 
> > Let me rephrase this... only in a quite longer monologue.
> > 
> > 
> > 
> > NetworkManager is just a GUI. A clever piece of GUI, but a GUI
> > nevertheless.
> > 
> > NetworkManager will probe the network driver (a kernel module) through a
> > standard interface in order to access it (wext). It will get all sort of
> > info about the available networks, like ESSID names, BSSIDs, Crypto
> > types. It displays that list to you in the dropdown menu.
> > 
> > Once you select a network in that menu, NetworkManager will generate a
> > wpasupplicant config and pass it to wpasupplicant, wait for proper
> > authentication to happen (done by wpasupplicant through wext too) and
> > the cryptography to be setup (done by wpasupplicant through wext too),
> > then run a dhcp request for an IP address.
> > 
> > So, NetworkManager is just a graphical remote control for wext and
> > wpasupllicant.
> > 
> > NetworkManager is not a wireless device driver, it never talks directly
> > to device drivers. It does not do any authentication or cryptography by
> > itself. It uses wext and wpasupplicant.
> > 
> > wpasupplicant is not a device driver, it never talks directly to device
> > drivers. It uses wext.
> > 
> > This is why I am reaching the conclusion that if you can connect to you
> > network using NetworkManager, then wpasupplicant must be working.
> > 
> > As an aside... I you go to the NetworkManager dev list and complain
> > about it not working, the first thing you will be asked is about making
> > it work first manually using only wpasupplicant, and then provide the
> > wpasupplicant conf file you used.
> > 
> > 
> > 
> > Now, about what I was advising you to use.
> > 
> > I gave you a link to a document on how to configure
> > the /etc/network/interfaces file.
> > 
> > /usr/share/doc/wpasupplicant/README.modes.gz
> > 
> > This file is the basic Debian way of configuring network. NetworkManager
> > came later and had to adapt to it (needed to be adapted to it, really).
> > 
> > This file is in fact a configuration file for a bunch of scripts that
> > are run when the network is starting.
> > 
> > All the configuration items starting with wpa- will in fact be used in
> > order to generate a wpasupplicant configuration, which will be then used
> > by wpasupplicant itself.
> > 
> > So you can consider /etc/network/interfaces to be a manual and
> > text-based NetworkManager, only less automated.
> > 
> > /etc/network/interfaces works the same way, except that it never probes
> > anything by itself and needs a minimum information beforehand. It never
> > talks to the kernel driver, it just uses wpasupplicant.
> > 
> > /etc/network/interfaces will have the pre-shared key, it does not need
> > any keyring manager.
> > 
> > 
> > 
> > Moreover, the Ubuntu implementation of NetworkManager scans for
> > interfaces configured in /etc/network/interfaces when it starts. If any
> > interface is manually configured there, it will leave it as it is and
> > not manage it in any way, thus avoiding a conflict of interests.
> > 
> > 
> > 
> > <soap box>
> > As a gratuitous and pedantic remark I will say
> > that /etc/network/interfaces is the "only one true Debian way" of
> > configuring the network on a Debian/Ubuntu system. NetworkManager is
> > late-coming click'O'matic that still has issues.
> > 
> > Don't get me wrong, I'm a big fan of NetworkManager on my laptops, I
> > just think that it should be avoided on fixed systems, especially
> > server-like devices, like MythTV systems tend to be.
> > </soap box>
> > 
> > 
> > 
> > 
> > In conclusion...
> > 
> > If NetworkManager works, then wpasupplicant works.
> > 
> > If wpasupplicant works, then /etc/network/interfaces should work.
> > 
> > The device driver is irrelevant.
> > 
> > 
> > 
> > Those were my slightly inflated 2 cents, and I am hoping they will help.
> > 
> > Nico
> > 
> Thanks to your very detailed explanations. I didn't had any experience
> with wireless network and linux before, so I did not know, that I could
> configure WLAN over /etc/network/interfaces. I was trying with
> wpa_supplicant.conf and network manager, which is indeed unnecessary for me, as I don't need
> any roaming.
> 
> So, what I did, is to configure WLAN via /etc/network/interfaces and when
> I start mythbuntu, network manager doesn't asks anymore for a password, as
> it doesn't touch the interface, which is already configured via
> /etc/network/interfaces.
> 
> One little problem is left:
> I have to perform 'ifup wlan0' after startup, and my WLAN is connecting to
> the AP without any problems.
> If I put 'auto wlan0' into /etc/network/interfaces, it's not working.
> 'ifconfig' shows me an additional wmaster0 interface and iwconfig shows, that
> my wlan card is not connected to any AP.
> 
> 
> Any ideas, how to automatically startup wlan0 at boot time? I thought
> about a shell script, what do you say?
> 
> Thanks in advance!
> Karl

I found a working solution now:

1) put 'auto wlan0' into /etc/network/interfaces
2) edit /etc/rc.local and put '/etc/init.d/networking restart' there
3) 'chmod +x /etc/rc.local' to activate this script

Now everything works fine as expected. WLAN is configured via /etc/network/interfaces and no password screen is appearing

Thank you very much, Nico, for your very detailed and good hints!

Karl

PS: Thanks to all mythbuntu developers, too, as I really like your product!
-- 
von Karl Reichert

GMX FreeMail: 1 GB Postfach, 5 E-Mail-Adressen, 10 Free SMS.
Alle Infos und kostenlose Anmeldung: http://www.gmx.net/de/go/freemail


More information about the mythtv-users mailing list