Bug 314093 - NM does not take the password out of the wallet when manually connecting to a wlan
Summary: NM does not take the password out of the wallet when manually connecting to a...
Status: RESOLVED FIXED
Alias: None
Product: Network Management
Classification: Miscellaneous
Component: general (show other bugs)
Version: 0.9
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Lamarque V. Souza
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-01-29 18:56 UTC by kabud
Modified: 2013-01-31 22:46 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
.xsession-error while manually initiating connections and beeing asked for the passwords even though they are seemingly available upon auto-connecting (43.95 KB, application/octet-stream)
2013-01-30 07:33 UTC, kabud
Details
.xsession-error with debug messages while manually initiating connections and beeing asked for the passwords even though one is stored in kwallet and the other as system connection (107.85 KB, application/octet-stream)
2013-01-31 22:22 UTC, kabud
Details

Note You need to log in before you can comment on or make changes to this bug.
Description kabud 2013-01-29 18:56:37 UTC
I have two wireless networks configured as 'Connect automatically' and the passwords are stored in kwallet. If I enable wireless, the network manager picks one and connects automatically just fine. But if I click in the plasma component on the other network, i.e., I manually initiate the connection, then a dialog comes up asking me for the password.

I am absolutely sure that the passwords for both are stored in the wallet though. I can assert that by configuring only one of them to connect automatically and then disable / re-enable wireless.

Reproducible: Always

Steps to Reproduce:
1. Click in the network manager plasmoid on a network for which you have the password stored in kwallet

Actual Results:  
A dialog comes up asking for the password.

Expected Results:  
The password should be taken out of the kwallet, like its done upon an automatic connect.

I am using kubuntu 12.10

cat /etc/apt/sources.list.d/kubuntu-ppa-b*quant*.list
deb http://ppa.launchpad.net/kubuntu-ppa/backports/ubuntu quantal main
deb-src http://ppa.launchpad.net/kubuntu-ppa/backports/ubuntu quantal main
deb http://ppa.launchpad.net/kubuntu-ppa/beta/ubuntu quantal main
deb-src http://ppa.launchpad.net/kubuntu-ppa/beta/ubuntu quantal main

dpkg:
network-manager 0.9.6.0-0ubuntu7 amd64 
network-manager-kde 1:0.9.0.5-0ubuntu1.1 amd64
plasma-widget-networkmanagement 0.9.0.5-0ubuntu1.1 amd64
Comment 1 Lamarque V. Souza 2013-01-29 20:03:28 UTC
It may surprise you but when more than one wifi connection is set as auto-connect NetworkManager client's (Plasma NM, nm-applet, etc) have no control on which one the NetworkManager daemon will choose to activate. NetworkManager must be activating the wrong connection and then asking the password for that wrong connection. You can check if the passwords are correctly saved using kwalletmanager program. Search for the connection's ssid in kwalletmanager's dialog.

Send me the  ~/.xsession-errors file and NetworkManager's log for when the problem happens.
Comment 2 kabud 2013-01-30 07:33:21 UTC
Created attachment 76800 [details]
.xsession-error while manually initiating connections and beeing asked for the passwords even though they are seemingly available upon auto-connecting
Comment 3 kabud 2013-01-30 07:35:11 UTC
(In reply to comment #1)
> It may surprise you but when more than one wifi connection is set as
> auto-connect NetworkManager client's (Plasma NM, nm-applet, etc) have no
> control on which one the NetworkManager daemon will choose to activate.

Oh. Indeed it is a bit surprising. But I think this the issue that I am observing is not caused by auto-connect. It is caused by manual connect.

> NetworkManager must be activating the wrong connection and then asking the
> password for that wrong connection. You can check if the passwords are
> correctly saved using kwalletmanager program. Search for the connection's
> ssid in kwalletmanager's dialog.
> 
Ok. I tried, but it is a rather cumbersome, since in kwalletmanager -> kdewallet -> Network Management -> Maps there are quite a number of entries and I don't really see how I can identify which line belongs to which network. I managed to find the password of one of the networks (lets call it A) but I couldn't find the password of the other (lets call it K). Maybe I overlooked something? Maybe it has to do with the fact that K is a 'System connection' whereas A is not?

Anyway, what I can do to convince myself that indeed both passwords are stored is the following:
- set A to auto-connect and K NOT to auto-connect
- disable network/ re-enable
- NM connects to A just fine without asking me for the password
- set A to NOT auto-connect and K to auto-connect
- disable network/ re-enable
- NM connects to K just fine without askting for the password


> Send me the  ~/.xsession-errors file and NetworkManager's log for when the
> problem happens.

Ok, I attach a copy of .xsession-errors file after performing the following sequence of events:
1 set both A and K to NOT auto-connect
2 rm .xsession-errors
3 reboot
4 click on A 
5 I'm asked for the kwallet password, I enter it
6 connection to A is established
7 click on K
8 I am asked for the password for K
9 I enter it, connecteion established
10 click on A
11 I am asked for A's password
12 enter A's password
13 connection to A is established
14 goto 7

maybe a relevant line from .xsession-errors is this:
kded(2753)/Network Management (NetworkManager backend) ConnectionDbus::fromDbusMap: Setting  "802-1x" not initialized
Comment 4 Lamarque V. Souza 2013-01-30 12:57:02 UTC
(In reply to comment #3)
> (In reply to comment #1)
> Ok. I tried, but it is a rather cumbersome, since in kwalletmanager ->
> kdewallet -> Network Management -> Maps there are quite a number of entries
> and I don't really see how I can identify which line belongs to which
> network. I managed to find the password of one of the networks (lets call it
> A) but I couldn't find the password of the other (lets call it K). Maybe I
> overlooked something? Maybe it has to do with the fact that K is a 'System
> connection' whereas A is not?

Yes, that is the reason. NetworkManager saves the password for system connections, not kwallet.
 
> Anyway, what I can do to convince myself that indeed both passwords are
> stored is the following:

Well, password for the system connection is *not* stored in kwallet.

> - set A to auto-connect and K NOT to auto-connect
> - disable network/ re-enable
> - NM connects to A just fine without asking me for the password
> - set A to NOT auto-connect and K to auto-connect
> - disable network/ re-enable
> - NM connects to K just fine without askting for the password

Yes, NM already saved the password, it does not need kwallet to activate connection K.
 
> > Send me the  ~/.xsession-errors file and NetworkManager's log for when the
> > problem happens.
> 
> Ok, I attach a copy of .xsession-errors file after performing the following
> sequence of events:

You have debug messages for Plasma NM disabled in kdebugdialog. Run kdebugdialog in the command line, search for the word "network", check all checkboxes that appear and repeat the sequence of events.
 
> maybe a relevant line from .xsession-errors is this:
> kded(2753)/Network Management (NetworkManager backend)
> ConnectionDbus::fromDbusMap: Setting  "802-1x" not initialized

That is a warning message, that should happen but it does not prevent the connection from working.
Comment 5 kabud 2013-01-31 22:20:32 UTC
(In reply to comment #4)
> (In reply to comment #3)
> > (In reply to comment #1)
> > Ok. I tried, but it is a rather cumbersome, since in kwalletmanager ->
> > kdewallet -> Network Management -> Maps there are quite a number of entries
> > and I don't really see how I can identify which line belongs to which
> > network. I managed to find the password of one of the networks (lets call it
> > A) but I couldn't find the password of the other (lets call it K). Maybe I
> > overlooked something? Maybe it has to do with the fact that K is a 'System
> > connection' whereas A is not?
> 
> Yes, that is the reason. NetworkManager saves the password for system
> connections, not kwallet.

Ah. I see!


> You have debug messages for Plasma NM disabled in kdebugdialog. Run
> kdebugdialog in the command line, search for the word "network", check all
> checkboxes that appear and repeat the sequence of events.
>  
 
Ok, will do.
Comment 6 kabud 2013-01-31 22:22:49 UTC
Created attachment 76846 [details]
.xsession-error with debug messages while manually initiating connections and beeing asked for the passwords even though one is stored in kwallet and the other as system connection
Comment 7 Lamarque V. Souza 2013-01-31 22:46:23 UTC
I fixed this bus one month ago: https://projects.kde.org/projects/extragear/base/networkmanagement/repository/revisions/64988f79dc199bbd4e96db0ea34f8c5bb6450747

You need to upgrade to Plasma NM 0.9.0.7 to get the fix. Plasma NM 0.9.0.6 also contains the fix but it also contains a regression in edit connection dialog, so I do not recommend using it.