NM asks for Wi-Fi password every time I log in, or every minute, if "Available to all users" not checked; forgets password too

Bug #854833 reported by Jane Silber
654
This bug affects 127 people
Affects Status Importance Assigned to Milestone
gnome-keyring (Ubuntu)
Confirmed
Undecided
Unassigned
network-manager (Ubuntu)
Triaged
Medium
Mathieu Trudel-Lapierre

Bug Description

With an up to date (as of 20 Sept) Oneiric beta, I have to re-enter the wireless password for all of my standard networks every time I log in. Expected behaviour is that Ubuntu remembers them. This is a regression from previous behaviour
---
ApportVersion: 1.23-0ubuntu1
Architecture: amd64
CRDA: Error: [Errno 2] No such file or directory
DistroRelease: Ubuntu 11.10
InstallationMedia: Ubuntu 10.10 "Maverick Meerkat" - Release amd64 (20101007)
IpRoute:
 default via 10.45.43.1 dev eth0 proto static
 10.45.43.0/24 dev eth0 proto kernel scope link src 10.45.43.13
 10.45.43.0/24 dev wlan0 proto kernel scope link src 10.45.43.94
 169.254.0.0/16 dev eth0 scope link metric 1000
Keyfiles: Error: [Errno 2] No such file or directory
NetworkManager.state:
 [main]
 NetworkingEnabled=true
 WirelessEnabled=true
 WWANEnabled=true
Package: network-manager 0.9.0-0ubuntu3
PackageArchitecture: amd64
ProcEnviron:
 PATH=(custom, no user)
 LANG=en_GB.UTF-8
 SHELL=/bin/bash
ProcVersionSignature: Ubuntu 3.0.0-11.18-generic 3.0.4
Tags: oneiric running-unity
Uname: Linux 3.0.0-11-generic x86_64
UpgradeStatus: Upgraded to oneiric on 2011-09-07 (13 days ago)
UserGroups: adm admin cdrom dialout lpadmin plugdev sambashare

Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote :

Is this with an upgrade from Natty or a new installation?

New connections should be writing passwords to the relevant connection's config file in /etc/NetworkManager/system-connections; so that the password would be remembered.

As a workaround, could you please verify if the connection is set to "Available to all users", and if not, enable that checkbox?

Changed in network-manager (Ubuntu):
status: New → Incomplete
importance: Undecided → Medium
Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote :

And something I forgot to add; could you please attach /var/log/syslog to this bug report or use 'apport-collect 854833' to add the information (syslog and other system information). NetworkManager's logs in syslog would include details on what happened when it tried to get passwords, which should help debugging the issue. Thanks!

Revision history for this message
Jane Silber (silbs) wrote :

An upgrade from 11.04 (with the same wireless networks that it has known about for a long time).

"Available to all users" was not checked. After enabling that, I think it is now remembering the password.

tags: added: apport-collected oneiric running-unity
description: updated
Revision history for this message
Jane Silber (silbs) wrote : Dependencies.txt

apport information

Revision history for this message
Jane Silber (silbs) wrote : Gconf.gz

apport information

Revision history for this message
Jane Silber (silbs) wrote : IfupdownConfig.txt

apport information

Revision history for this message
Jane Silber (silbs) wrote : IpAddr.txt

apport information

Revision history for this message
Jane Silber (silbs) wrote : IwConfig.txt

apport information

Revision history for this message
Jane Silber (silbs) wrote : NMTool.txt

apport information

Revision history for this message
Jane Silber (silbs) wrote : NetDevice.eth0.txt

apport information

Revision history for this message
Jane Silber (silbs) wrote : NetDevice.lo.txt

apport information

Revision history for this message
Jane Silber (silbs) wrote : NetDevice.wlan0.txt

apport information

Revision history for this message
Jane Silber (silbs) wrote : PciNetwork.txt

apport information

Revision history for this message
Jane Silber (silbs) wrote : RfKill.txt

apport information

Revision history for this message
Jane Silber (silbs) wrote : WifiSyslog.txt

apport information

Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote : Re: (oneiric) wireless passwords not remembered

Thanks, so this is most likely then an issue in how passwords got migrated. I'm tracking a few similar bugs, aiming for a more permanent fix real soon.

Changed in network-manager (Ubuntu):
status: Incomplete → Triaged
assignee: nobody → Mathieu Trudel-Lapierre (mathieu-tl)
Revision history for this message
Guillaume Modard (guillaumemodard) wrote :

I confirm the bug :

If I do not check "Available to all user", Ubuntu don't remember wireless password.

Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote :

Great, thanks Guillaume.

Unfortunately, this is just a workaround for now; I'm working on reproducing the issue in a controllable manner and pinpointing the exact source of the issue.

Revision history for this message
Jane Silber (silbs) wrote :

Thunderbird also lost ability to remember passwords through an upgrade (specifically an address book connection to a password protected ldap server). Seems like that is probably another symptom of the same problem? If not, let me know and I can file a separate bug.

Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote :

Hmm, it actually really doesn't sound like the same thing now, it looks far more like an issue specific to passwords in gnome-keyring.

I'm opening a task for gnome-keyring.

To verify; do you see all of the connections you should see in network-manager, or could some one them be missing?

Revision history for this message
Jane Silber (silbs) wrote :

Sorry, I'm not sure what you mean by "see all the connections I should see in network-manager". In the drop down from the network indicator, I see the wired and wireless connection as I would expect (i.e, one when only one is connected, both when both are connected). There are of course the other access points listed below, but that may or may not be a complete set - I'm not sure since I am typically in an environment with lots of access points.

Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote :

I actually meant whether you see all your configured connections in the connection editor (click the applet, then Edit Connections..), including VPN connections you may have configured. This is going to clarify whether there was an issue with migration or if it's "just" with gnome-keyring, or just passwords.

Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote :

Okay, I believe I've finally made good progress.. Even if it's quite sad it happened so late ;)

To get more information, I decided to give the Fedora 16 Live CD a try, since it was likely broken there too in which case I could provide useful information to upstream to help with the debugging -- or not broken, in which case we'd have another path to investigate.

Turns out it works properly there, or at least I can definitely see the "metric 2" tag I'm expecting on wifi routes (since I don't currently have everything I need to properly test this at this moment). I checked and it had libnl1.1 installed. I didn't think of checking whether libnl3 was also installed or what version of NetworkManager was used (though I'm highly confident it's the same as what we have in Oneiric, for having compared packaging before).

So; I was able to locally rebuild NetworkManager against libnl1 (libnl-dev) instead of libnl3 (libnl3-dev), and I can now see the metric on wifi routes on my system in Oneiric. Once I'm back home I'll properly test this with wired connected (to ensure proper behavior and that there are no other side-effects), then most probably upload NM with the updated Build-Depends early tomorrow morning, EST.

Regardless, I think it's extremely good news (despite the work that was done for the libnl3 migration), and I'm setting this bug to In Progress to denote the fact that I have a clear fix being worked on.

Changed in network-manager (Ubuntu):
status: Triaged → In Progress
importance: Medium → High
status: In Progress → Triaged
importance: High → Medium
Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote :

And... in excitement I write this in the wrong bug report. :) Please disregard the above, it was meant for bug 856333.

Revision history for this message
Jane Silber (silbs) wrote :

Yes, I see all the connections (in response to comment #22)

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in gnome-keyring (Ubuntu):
status: New → Confirmed
Revision history for this message
Kevin S (ks20xx) wrote :

Confirmed. Also occurs on Kubuntu 11.10.

Revision history for this message
Sam_ (and-sam) wrote :

FWIW. Never had the issue of not remembering wl pw. (upgraded from Natty in June)
Wired is set to automatic connect, available to all user.
Wireless is set to automatic connect, available to all user is disabled.
network-manager:
  Installed: 0.9.1.90-0ubuntu2
  Candidate: 0.9.1.90-0ubuntu2
  Version table:
 *** 0.9.1.90-0ubuntu2 0

Revision history for this message
Michal Voců (michal-vocu) wrote :

This happens on all four computers where I put oneiric (3 upgraded from natty, 1 fresh install). The behaviour is always the same:

1. I start with wifi configured and wireless password set and stored in keyring. Everything works.
2. When network-manager tries to reconnect (after a signall loss or something), it shows dialog asking for wireless password with password pre-filled. When confirmed, wifi connects, but wireless password from keyring is gone.
3. Next connection attempt(s) always ask for password, no password is pre-filled and the entered password is not stored into keyring.
4. After adding back the password using nm -connection-editor, I go back to 1.

It looks like the nm dialog (unlike nm-connection-editor) is not able to store passwords into keyring, so the password is eventually gone. The package versions are:
gnome-keyring 3.2.1-0ubuntu1
network-manager 0.9.1.90-0ubuntu5

Needless to say this is very annoying and keeps me from upgrading on my main computer.

Revision history for this message
Phil Dibowitz (jaymzh) wrote :

Any update on this? Not only do I get prompted every time I login, but if I don't touch my computer for a few days I unlock it and have hundreds of password prompts open...

Revision history for this message
BenNewton (ben-m-newton) wrote :

I have this bug too, upgraded to 11.10 from 11.04 and had to retype the pw after every suspend. Checking 'available to all users' fixes it and is a mighty fine work around.
Thanks Team!

Revision history for this message
Scott Talbert (swt-techie) wrote :

As for the workaround, I'm seeing the 'available to all users' box grayed out for some of my wireless connections. Any idea why that is?

Is this still a problem in Precise?

Revision history for this message
eipi-1 (eipiminusone) wrote :

@Scott Talbert: I see the 'available to all users' box grayed out, if the passphrase is not saved. If I swtich to the 'Wireless Security' Tab and enter a password, the box becomes clickable.

Btw: Thanks for the workaround.

Revision history for this message
oriolpont (oriolpont) wrote :

In my case (WPA enterprise with TTLS) the password is remembered independently of the "available to all users" option. The problem is that since oneiric it is stored in /etc/NetworkManager as plaintext and not in the keyring.

Thomas Hood (jdthood)
summary: - (oneiric) wireless passwords not remembered
+ NetworkManager forgets wireless password
Revision history for this message
Jacob Nevins (0jacobnk-ulp) wrote : Re: NetworkManager forgets wireless password

> Is this still a problem in Precise?

On Precise, I'm seeing a problems that look like at least some of the reports here (and also bug #877803, which looks very similar but isn't yet linked). Here's a verbose "me too"; the salient features are:
* After a WiFi connection has been dropped or had trouble connecting due to marginal signal, Network Manager forgets the password.
** This can happen pretty frequently when I connect to a network at the edge of its range.
** (I'd independently formulated a theory similar to one in bug #877803, that NM should "only update the keyring after successfully authenticating to the wireless network". I haven't checked for basis in fact though.)
* Once this has happened, NM never remembers a passphrase entered to connect to a network, even if authentication is then successful. Going into "Edit Connections" and entering the passphrase there causes it to be remembered (until the next time there's a connection problem).
* I don't have "available to all users" checked for the connection.
** This is deliberate; I want the wireless credentials stored in the (encrypted) home directory, rather than on the root filesystem. So the workaround given isn't useful for me.

This all matches symptoms reported previously.

This is quite annoying. If there's any other information I can provide to help get this fixed, please shout.

Revision history for this message
Bernd Porr (berndporr) wrote :

I can confirm that this is happening on precise. I get the password prompted every minute which makes working with wireless completely useless.

Thomas Hood (jdthood)
tags: added: precise
summary: - NetworkManager forgets wireless password
+ NM asks for Wi-Fi password every time I log in, or every minute, if
+ "Available to all users" not checked; forgets password too
Revision history for this message
gcc (chris+ubuntu-qwirx) wrote :

I just discovered something that may be interesting/useful for debugging this issue:

I have several networks where the password is always lost (e.g. after suspend and resume). I would always be prompted for the password when connecting, and nothing would be pre-filled in the password box. It's not available to all users (deliberately), only to me.

Following the above comments, I went into the Network Manager applet and selected this network, and then the Security tab. To my surprise, there was no password stored on this tab. I entered the password here, saved and closed the network details, and went in to edit them again; the password was still saved. And now I can connect to that network with no problems.

So it seems that the Network Manager applet is unable to save the password in whatever repository is used to populate the security details on this tab.

Revision history for this message
Dario Bertini (berdario) wrote :

There's a similar issue, when it asks for the password, but in the meanwhile it can actually connect... but for each failed tentative or something, it'll pop up a new prompt

I found out that in my case that was due to multiple connections were set up for the same wifi (it was done automatically... maybe when OKing on a prompt that happens when the signal strength is low), deleting them helped out

Revision history for this message
Martin (lodp) wrote :

I ran into the exact same problem after updating my Kubuntu 12.04 laptop to 13.10. The password is there in the connection settings, but KDE Daemon pops up asking for the password over and over. Connection drops all the time with that, too. I ended up having to remove network-manager and replacing it with wicd (which also has a serious bug preventing you from starting the daemon: https://bugs.launchpad.net/wicd/+bug/1193856). It's a holy mess, rendering the laptop next to unusable for days.

Revision history for this message
Tonal (tonal-promsoft) wrote :
Revision history for this message
arty (me-arty) wrote :

Still happens in Vivid 15.04

Revision history for this message
Romano Giannetti (romano-giannetti) wrote :

New installation of 14.04.3, still happens. It happens only for enterprise-type connection (my university and eduroam, both WPA). The WPA personal connections (where you do not have to put an username) are ok, remembered and automatically started.

Revision history for this message
mue.de (emuede) wrote :

I upgraded the ASUS-EE-PC from Kubuntu 12.04 LTS to Kubuntu 14.04 LTS (Trusty Tahr), which worked excellent; thanks for the great Job!
Now the WPA2-Passphrase for my WLAN isn't stored in kwallet unless i mark the option 'Available to all users'.

muelux@muelux-NBCaro:~$ lsb_release -ids
Ubuntu
Ubuntu 14.04.3 LTS
muelux@muelux-NBCaro:~$ uname -r
3.2.0-54-generic
muelux@muelux-NBCaro:~$

Revision history for this message
mue.de (emuede) wrote :

In additio to [https://bugs.launchpad.net/ubuntu/+source/network-manager/+bug/854833/comments/43|#43]
P.S.: I did already an 'sudo dpkg-reconfigure network-manager' an checked that the kwallet is working wright

Revision history for this message
Patrick-Jeffrey Pollo Guilbert (patrick-pollo-guilbert) wrote :

Still happens with here with the latest Ubuntu version. It keeps asking for the password even though it didn't change...

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.