Bug 540546 - knetworkmanager does not save password if kwallet is disabled
Summary: knetworkmanager does not save password if kwallet is disabled
Status: RESOLVED UPSTREAM
Alias: None
Product: openSUSE 11.3
Classification: openSUSE
Component: KDE4 Workspace (show other bugs)
Version: Final
Hardware: i386 openSUSE 11.3
: P3 - Medium : Major with 5 votes (vote)
Target Milestone: ---
Assignee: E-mail List
QA Contact: E-mail List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-09-20 08:36 UTC by Stefan Assmann
Modified: 2011-12-08 19:18 UTC (History)
6 users (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments
knm output while activating connection after disabling kwallet and before restarting knm (6.12 KB, text/plain)
2010-03-31 20:16 UTC, Robin Knapp
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Stefan Assmann 2009-09-20 08:36:36 UTC
User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.2) Gecko/20090730 SUSE/3.5.2-3.4 Firefox/3.5.2

Hi Will,

I really don't like kwallet so I did the following on a clean installation to reproduce the issue:
added a new wireless connection with encryption, kwallet will popup and ask me to create an account, so I clicked basic setup and finish to not create an account. Afterwards kwallet is quiet and plasmoid will ask me to reenter the password again. After doing that the connection will just not work without any further notice(which I think should at least be communicated to the user). After checking the log it says no credentials provided. I checked the plasmoid settings and default is to store it unencrypted. Changing it to encrypted file didn't work either. Still the log complains about missing password. The only thing that works is to select "prompt for password". Could you please check on this? :)




Reproducible: Always
Comment 1 Will Stephenson 2009-10-21 15:23:47 UTC
I can't reproduce this with the inhouse Novell network with RC1  On a clean user account, knetworkmanager falls back to unencrypted storage.  How about some exact details on steps to reproduce?
Comment 2 Stefan Assmann 2009-10-21 16:26:10 UTC
Sure, I'm always glad if you take a look at the bugs :) I only have wireless around, I think the problem won't show on ethernet.

Exact steps with a clean user account:
- WLAN Interface -> Create Network Connection
- Select SSID (btw, my WPA2 WLAN is detected as WEP encrypted 128bit? Might be another bug)
- Select Security WPA/WPA2 Personal
- Enter Password

Now KWallet pops up, just click Next and Finish w/o changing any defaults.

Afterwards a new networkmanager window will popup asking for the WPA2 password again? Entering the password has no effect, no connection established

sudo tail /var/log/NetworkManager
Oct 21 18:18:45 samsung NetworkManager: <info>  Activation (eth1/wireless): access point 'TitanNet' has security, but secrets are required.
Oct 21 18:18:45 samsung NetworkManager: <info>  (eth1): device state change: 5 -> 6 (reason 0)
Oct 21 18:18:45 samsung NetworkManager: <info>  Activation (eth1) Stage 2 of 5 (Device Configure) complete.
Oct 21 18:19:31 samsung NetworkManager: <WARN>  get_secrets_cb(): Couldn't get connection secrets: The wallet was disabled.
Oct 21 18:19:31 samsung NetworkManager: <info>  (eth1): device state change: 6 -> 9 (reason 7)
Oct 21 18:19:31 samsung NetworkManager: <info>  Activation (eth1) failed for access point (TitanNet)
Oct 21 18:19:31 samsung NetworkManager: <info>  Marking connection 'TitanNet' invalid.
Oct 21 18:19:31 samsung NetworkManager: <info>  Activation (eth1) failed.
Oct 21 18:19:31 samsung NetworkManager: <info>  (eth1): device state change: 9 -> 3 (reason 0)
Oct 21 18:19:31 samsung NetworkManager: <info>  (eth1): deactivating device (reason: 0).
Comment 3 Will Stephenson 2009-10-26 15:32:01 UTC
The other bug is 201993.  https://bugs.kde.org/show_bug.cgi?id=201993
Comment 4 andrea florio 2009-11-14 13:19:16 UTC
that may be related.
if kwallet is disable knetworkmanager REFUSE to connect, even if the secret is manually added:

Nov 14 14:00:25 linux-v7hl NetworkManager: <info>  Activation (eth1) starting connection 'Linux_Network'
Nov 14 14:00:25 linux-v7hl NetworkManager: <info>  (eth1): device state change: 3 -> 4 (reason 0)       
Nov 14 14:00:25 linux-v7hl NetworkManager: <info>  Activation (eth1) Stage 1 of 5 (Device Prepare) scheduled...
Nov 14 14:00:25 linux-v7hl NetworkManager: <info>  Activation (eth1) Stage 1 of 5 (Device Prepare) started...  
Nov 14 14:00:25 linux-v7hl NetworkManager: <info>  Activation (eth1) Stage 2 of 5 (Device Configure) scheduled...
Nov 14 14:00:25 linux-v7hl NetworkManager: <info>  Activation (eth1) Stage 1 of 5 (Device Prepare) complete.     
Nov 14 14:00:25 linux-v7hl NetworkManager: <info>  Activation (eth1) Stage 2 of 5 (Device Configure) starting... 
Nov 14 14:00:25 linux-v7hl NetworkManager: <info>  (eth1): device state change: 4 -> 5 (reason 0)                
Nov 14 14:00:25 linux-v7hl NetworkManager: <info>  Activation (eth1/wireless): access point 'Linux_Network' has security, but secrets are required.
Nov 14 14:00:25 linux-v7hl NetworkManager: <info>  (eth1): device state change: 5 -> 6 (reason 0)                                                  
Nov 14 14:00:25 linux-v7hl NetworkManager: <info>  Activation (eth1) Stage 2 of 5 (Device Configure) complete.                                     


<---- here the issuse ---->
Nov 14 14:00:31 linux-v7hl NetworkManager: <WARN>  get_secrets_cb(): Couldn't get connection secrets: The wallet was disabled.                     
Nov 14 14:00:31 linux-v7hl NetworkManager: <info>  (eth1): device state change: 6 -> 9 (reason 7)                                                  
Nov 14 14:00:31 linux-v7hl NetworkManager: <info>  Activation (eth1) failed for access point (Linux_Network)                                                                        
Nov 14 14:00:31 linux-v7hl NetworkManager: <info>  Marking connection 'Linux_Network' invalid.
Comment 5 Will Stephenson 2009-12-03 12:59:31 UTC
Andrea:  what storage method is selected?  (Manage connections->Other->Connection Secrets) 

I can't reproduce this with 11.2 + today's update (1.3.1).
Comment 6 andrea florio 2009-12-03 15:58:40 UTC
Hi will.. i can confirm it. this new update fix also my issue..
Comment 7 Stefan Assmann 2009-12-09 14:10:51 UTC
I updated my 11.2 system today and nothing has changed. Still observing the same old problem.
Comment 8 Arootin Hayrabedian 2010-03-19 04:02:40 UTC
I can confirm it too.
I'm using KDE 4.4.1 from Factory
Comment 9 Stefan Assmann 2010-03-19 07:36:40 UTC
still seeing the same behavior as reported in the initial comment with 11.3 Milestone 3
Comment 10 Robin Knapp 2010-03-23 18:06:32 UTC
Same here, very annoying and *always* hits me and my collegues since 11.2:

My steps to reproduce it with 11.3 M3:

- boot live usb
- klick on knm4 icon
- select "add wireless network" (iirc)
- select the network from the list
- it asks for wpa2 key
- kwallet opens
- next next next ... -> kwallet will be disabled
- knm4 asks again for secrets
- entering secrets does not help - it also does not ask again
- run: kquitapp knetworkmanager
- run: knetworkmanager
- connect works with the defined connection

So what happens? Maybe this:
- knetworkmanager tries to open wallet and assumes, wallet is enabled
- wallet initialization disables the wallet system
- knetworkmanager still provides the info that the pass is stored in the wallet but saves the credentials in the config file (from my memory - have to verify this)
- after restarting it sees that wallet is disabled and provides the pass using the config file
Comment 11 Robin Knapp 2010-03-23 18:30:02 UTC
Just tested again, some corrections:
It does indeed ask again and again for the secrets, but cannot connect.

exerpt from .xsession-errors:

knetworkmanager(3442)/Network Management (ui) ConnectionSecretsJob::dialogAccepted:
knetworkmanager(3442)/Network Management (internals) Knm::WirelessPersistence::save: "802-11-wireless-security"
knetworkmanager(3442)/kdeui (Wallet) KWallet::Wallet::openWallet: Pass a valid window to KWallet::Wallet::openWallet().
kdeinit4: preparing to launch /usr/lib/libkdeinit4_kwalletd.so
klauncher(3235)/kio (KLauncher) KLauncher::processRequestReturn: "/usr/bin/kwalletd" (pid 3575) up and running.
knetworkmanager(3442)/kdeui (Wallet) KWalletDLauncher::getInterface: The kwalletd service has been registered
kwalletd(3576) kdemain: kwalletd is disabled!
knetworkmanager(3442)/Network Management (NetworkManager backend) BusConnection::gotSecrets: ERROR: The KDE wallet is disabled
kded(3237)/networkstatus NetworkStatusModule::solidNetworkingStatusChanged: SolidNetwork changed status:  1
kded(3237)/networkstatus NetworkStatusModule::setNetworkStatus: "SolidNetwork" ,  1
kded(3237)/Solid (NetworkManager) NMNetworkManager::propertiesChanged: ("ActiveConnections", "State")
kded(3237)/Solid (NetworkManager) NMNetworkManager::propertiesChanged: "ActiveConnections"
kded(3237)/Solid (NetworkManager) NMNetworkManager::propertiesChanged:    "/org/freedesktop/NetworkManager/ActiveConnection/1"
kded(3237)/Solid (NetworkManager) NMNetworkManager::propertiesChanged: ("ActiveConnections")
kwin(3393) KWin::Workspace::updateClientArea: screens:  1 desktops:  4
kwin(3393) KWin::Workspace::updateClientArea: Done.
kwalletd(3575): Communication problem with  "kwalletd" , it probably crashed.
Error message was:  "org.freedesktop.DBus.Error.ServiceUnknown" : " "The name org.kde.kwalletd was not provided by any .service files" "

knetworkmanager(3442)/Network Management (service) InterfaceNotificationHost::interfaceConnectionStateChanged: 9 7
knetworkmanager(3442)/Network Management (internals) KNetworkManagerServicePrefs::instance: KNetworkManagerServicePrefs::instance called after the first use - ignoring
knetworkmanager(3442)/Network Management (service) InterfaceNotificationHost::performInterfaceNotification: "XXXXSSIDXXXX on Wireless 802.11" "Connection Failed because secrets were not provided" 0



hope this helps...
Comment 12 Robin Knapp 2010-03-31 20:13:56 UTC
I did some more testing with 11.3M4 live usb media.

observed the following:

1. first boot without networkmanagement and kwallet configuration
2. click on Connect to other network in the tray
3. select wlan and enter key
4. select next, finish in kwallet to disable it
5. knm asks again for passphrase

now I looked around:
- security setting of knm is set to file/unencrypted
- the file in .kde4/share/apps/networkmanagement/connections does not have a wpa key stored. knm resists in saving it in the disabled and not responding kwallet

going on with testing:

6. select manage-connections and delete the connection added in step 3/4
7. manually create a new connection, enter passphrase...

- the file in .kde4/share/apps/networkmanagement/connections has the wpa key now set - looks fine

8. select this connection added in step 6. from the tray menu

- stdout of knm now reveals that it still tries to talk to kwallet even if it's disabled in the settings and the wpa key is stored in the connections file

9, kquitapp knetworkmanager
10. knetworkmanager
11. do the same as in step 8 (activate the stored connection)
12. knm finally connects

I'll attach the stdout of knm before restarting


I'm also raising severity as this probably hits every live-cd user and everyone who sets up the network connection without having manually disabled the kwallet first.
Comment 13 Robin Knapp 2010-03-31 20:16:13 UTC
Created attachment 351812 [details]
knm output while activating connection after disabling kwallet and before restarting knm
Comment 14 antonio russo 2010-07-04 06:20:24 UTC
ho lo stesso problema in molte versioni 
avvolte con kill knetworkmanager e il riavvio da terminale con privilegi di knetworkmanager tutto funziona
se si tenta la connessione solo con riga di comando il problema non c'รจ
Comment 15 antonio russo 2010-07-04 16:19:22 UTC
confermo, anche in 11.3 rc2 ho lo stesso problema e lo risolvo con kill knetworkmanager e lo faccio ripartire da terminale
Comment 16 Stefan Assmann 2010-07-16 16:01:26 UTC
still happens in 11.3 final
Comment 17 Bruno Canning 2010-12-06 20:19:02 UTC
Hi Folks,

Forgive me if I have blundered into this bug report from a point of ignorance, but if you are trying to use knetworkmanager without using kwallet, here is my solution:

Open the "Configure" box by clicking on the knetworkmanager icon in the system tray and selecting "Manage Connections...".

Click on "Other" in left hand panel.

Click on the "Connection Secrets" tab and select "In file (unencrypted)" from the drop-down menu.

Head back to "Network Connections" and click on the "Wireless" tab. Click on "Add" and supply knetworkmanager with the details.

From now on you will be connected to your wireless networks automatically when your wifi card is active and you are in range of one of your networks.

Apologies if you were after an encrypted solution. You can try setting up kwallet without a password and permanently allowing access to/from it (I can't remember the exact phrase used). However, if you were just after a set-and-forget solution and you don't mind that your network credentials are stored as plain text in a file, this method should work for you.
Comment 18 Forgotten User --EoyBps8f 2011-12-08 19:18:08 UTC
11.3 is too old. knetworkmanager unmaintained. If this still happens with 12.1's plasmoid-networkmanagement, please report upstream.

http://en.opensuse.org/openSUSE:Bugreport_KDE#Before_you_report_bugs

You can also try a current version of KDE with older openSUSE versions.

http://en.opensuse.org/KDE_repositories