Ubuntu

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

Reported by Jane Silber on 2011-09-20
632
This bug affects 120 people
Affects Status Importance Assigned to Milestone
gnome-keyring (Ubuntu)
Undecided
Unassigned
network-manager (Ubuntu)
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

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

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!

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

apport information

Jane Silber (silbs) wrote : Gconf.gz

apport information

apport information

apport information

apport information

apport information

apport information

apport information

apport information

apport information

apport information

apport information

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)

I confirm the bug :

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

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.

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.

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?

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.

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.

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

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

Jane Silber (silbs) wrote :

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

Launchpad Janitor (janitor) wrote :

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

Changed in gnome-keyring (Ubuntu):
status: New → Confirmed
Kevin S (ks20xx) wrote :

Confirmed. Also occurs on Kubuntu 11.10.

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

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.

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...

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!

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?

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.

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) on 2012-06-23
summary: - (oneiric) wireless passwords not remembered
+ 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.

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) on 2012-07-22
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
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.

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

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.

To post a comment you must log in.