Why does Network Manager always ask for my keyring password?

Solution 1:

There is an option in Network manager not to use password. If you edit the connection, at the bottom of the page there is a box "available to all users" if you tick this it will not require a password.

To edit right click the icon, select edit Connections, select wireless,select your connection and click edit.

screenshot

Solution 2:

NM does not ask for your root password! It asks for your keyring password.
Your keyring saves passwords encrypted, so no one can steal them. That is why you need to enter your keyring password, so Ubuntu can decrypt your passwords to use them (eg. to get your WLAN-Password).

You can check the content of your keyring in Menu -> System -> Preferences -> Passwords and Encryption Keys. Here you will find all your passwords in cleartext, after you unlocked your keyring (rightklick an element -> properties -> password -> show password).

To change your keyring password, rightklick the line Password: login and choose Change Password

Choosing no password will make keyring never ask for any password again, but still save them (unencrypted! So this should not be your first choice on a Notebook).

Solution 3:

The reason why NetworkManager asks for your password is that it wants to keep your passwords in a safe place (an encrypted keyring), while ConnMan doesn't care about that...

If you don't care about security, you can remove the password from the GNOME keyring, or use ConnMan instead...

And migrating to ConnMan as the default in Ubuntu is currently no option, as it only support Ethernet and WiFi, but no modems (PSTN, ISDN, DSL, 3G), Bluetooth, VPN, etc.

Solution 4:

For WPA-Enterprise connections using a username/password, the password is usually stored in the user keyring, even if the "available to all users" checkbox is ticked.

The only way I have found to prevent that NetworkManager asks for my password is by manually editing the connection settings:

  1. Edit the network connection, making sure the "available to all users" checkbox is enabled. Save it.

  2. Open a terminal and change directory: cd /etc/NetworkManager/system-connections. Each file in that directory represents one of the connections saved to "all users" by NetworkManager.

  3. Use sudo grep flags * to list all the files that use password flags. You will see the file name that represents your WPA Enterprise wifi connection. Let's call that file myconnection.

  4. Edit the file sudo nano myconnection

  5. Go to the section [802-1x] in the file, remove the password-flags and add a line password=mypassword.

  6. Save the file

On the next reboot NetworkManager should have the password already, so it should not need to unlock the keyring to connect to it.

Note that this approach stores your password in a plain text file. Although the text file is only readable by root, NetworkManager is able to read it, and any user can see the password as well going to the "edit connection" settings in NetworkManager. This solution may be practical to users who use a paswordless-login on a computer that is only used by them.