10

I had previously learned that NetworkManager stores WiFi passwords in /etc/NetworkManager/system-connections/<wifi name> file. But in my case on Ubuntu 15.10 I can't find any password in that file.

I tried this:

sudo cat /etc/NetworkManager/system-connections/cig | grep psk
[sudo] password for edward: 
key-mgmt=wpa-psk
psk-flags=1

here does NetworkManager store WiFi passwords?

  • it is in mine under [wifi-security] and starts with psk= :P – Rinzwind Nov 24 '15 at 13:49
  • @Rinzwind which Ubuntu you are using? – Edward Torvalds Nov 24 '15 at 13:51
  • 15.10 ofc ourse ;) are you sure you saved the password? – Rinzwind Nov 24 '15 at 13:51
  • @Rinzwind of course, I use that wifi connection everyday without entering password again and again – Edward Torvalds Nov 24 '15 at 14:01
12

If you choose to only enable your user to use that wifi network, then the wifi password is stored in the gnome keyring of your current user.

If you let every one use that wifi connection, the password is stored in the file you mentionned.

You can also manually change where that password is stored in network manager settings for that wifi network, security tab, click the hdd+green arrow icon in password field and make your choice.

enter image description here

  • Just checked it here. no need to restart network manager for the change to take effect. Your problem is elsewhere – solsTiCe Nov 24 '15 at 14:07
  • Are you looking in the right file ? – solsTiCe Nov 24 '15 at 14:10
4

The password files are saved in this folder :
(in case the password is stored for all users)

/etc/NetworkManager/system-connections  

Execute this command to show all information :

sudo cat /etc/NetworkManager/system-connections/YOUR-SSID  

When the password is stored for only one user, it is saved in gnome-keyring.

1

You could consider using the nmcli command to update whatever NetworkManager does under the hood. To show the current password for SSID "example":

nmcli --show-secrets connection show id example | fgrep 802-1x.password

To update the password for the SSID "example" use:

(IFS='' read -s -r -p '802.1X password '; nmcli connection modify id example 802-1x.password "$REPLY")

Most of that command is to prevent the new password being displayed on the terminal, remaining in an environment variable, or being in the shell history.

-1

If you just want to SEE the passwords and other info and not edit, and you prefer doing things gui style, in a terminal window type:

sudo nautilus

then enter password at the prompt and you can navigate with the nautilus file manager to the file and read it.

Displaying in the terminal is more straightforward and probably more secure but some WinDOHs converts will prefer the pretty windowsy interface.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.