I am connected via wlan to the internet. I was wondering where my password is saved on the raspberry pi. Once I saw it in plain text somewhere. I thought it was under


But this file is empty. I tried


as well. This file is not empty, but there is no information about my password. Then I tried

grep -r -i "MY_WLAN_NAME" ./


grep -r -i "wlan0" ./

without any proper results. Do you have any idea where my password could be located at, or at least how to find it?

Further information: I am using a raspberry pi 3 model b; operating system: raspbian.

  • What OS are you using? You should also add details of your Pi.
    – Milliways
    Commented Sep 10, 2016 at 11:27
  • If you are using Raspbian please check the configuration files in cd /etc/NetworkManager/system-connections location. As @Milliways suggested the pi details is very much essential.
    – Varad A G
    Commented Sep 10, 2016 at 11:29
  • 1
    @Milliways: I used the tag raspian. I will add some details about my pi in the question above.
    – Chris311
    Commented Sep 11, 2016 at 11:37
  • @VaradAG: there is no folder. /etc/network does exist though.
    – Chris311
    Commented Sep 11, 2016 at 11:41
  • @Chris311can you add the details of "/etc/network/interfaces"
    – Varad A G
    Commented Sep 11, 2016 at 12:13

2 Answers 2


If you are using Raspbian and the default setup, WiFi details will be in /etc/wpa_supplicant/wpa_supplicant.conf. NOTE You need to use sudo to access the contents (this is a security setting to protect passwords).

/etc/network/interfaces should also exist, and CAN be used to configure WiFi, but is not standard, and not recommended.

There are many different ways of setting networks, but these require specific changes on your part.

How do I set up networking/WiFi/Static IP describes the standard file settings.

  • Isn't this a security leak? The password is stored as plain text in a file. Is this the same with windows?
    – Chris311
    Commented Sep 11, 2016 at 12:07
  • @Chris311 if you know the root password on a 'NIX system you can access and change anything. Indeed on any system the administrator can do almost anything, although I can't say what Windows does - I gave up on it years ago.
    – Milliways
    Commented Sep 11, 2016 at 12:18
  • @Chris311 Yes windows does let you access wifi passwords with the root password just like OS X Commented Sep 11, 2016 at 15:14

If "connman" is your default network manager on you pi then you will have all the relevant setting regarding your wifi will be in one of the directories in "/var/lib/connman".

The name of the directory in actually the wifi-identifier (i don't know the official name for this id).

And you can figure out the id by running connmanctl services and checking the id against the AccessPoint name.

  • Sadly, this is not the case. I don't use connman.
    – Chris311
    Commented Sep 11, 2016 at 11:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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