How to find saved WIFI passwords in Ubuntu easily.

Posted: August 24, 2017. At: 3:04 PM. This was 4 weeks ago. Post ID: 11256

To find all the saved WIFI passwords and Ethernet connection information on your Linux desktop or laptop, navigate to this directory.

/etc/NetworkManager/system-connections

Here are the connections on my laptop.

┌─[root@parrot][/etc/NetworkManager/system-connections]
└──╼ #ls -hula
total 20K
drwxr-xr-x 2 root root 4.0K Aug 24 13:36 .
drwxr-xr-x 7 root root 4.0K Aug 24 13:29 ..
-rw------- 1 root root  369 Aug 24 13:33 NetComm Wireless
-rw-r--r-- 1 root root  191 Aug 24 13:30 NetworkManager-USRP
-rw------- 1 root root  375 Aug 24 13:19 OPTUSVD3AEDEA

This is what a WIFI connection file looks like. This stores the Pre Shared Key in plain text.

┌─[root@parrot][/etc/NetworkManager/system-connections]
└──╼ #cat NetComm\ Wireless 
[connection]
id=NetComm Wireless
uuid=2a64036c-fa4f-48db-9f7e-c93fc9eb066a
type=wifi
permissions=user:jason:;
 
[wifi]
mac-address=F4:B7:E2:C9:1B:E3
mac-address-blacklist=
mode=infrastructure
ssid=NetComm Wireless
 
[wifi-security]
auth-alg=open
key-mgmt=wpa-psk
psk=a1b2c3d4e5
 
[ipv4]
dns-search=
method=auto
 
[ipv6]
addr-gen-mode=stable-privacy
dns-search=
method=auto

So this is how to recover a WIFI password if you have forgotten it. A very useful Linux tip. Recovering passwords in Android is similar. The passwords on an Android phone are stored in the wpa_supplicant.conf file in the /data/misc/wifi directory, but this is not accessible unless you are using a rooted phone. Linux is easy though, the files are not accessible unless you are using a root prompt or sudo.

┌─[jason@parrot][~]
└──╼ $cat /etc/NetworkManager/system-connections/NetComm\ Wireless 
cat: '/etc/NetworkManager/system-connections/NetComm Wireless': Permission denied

So, this is relatively secure. This is what the Ethernet connection configuration looks like.

┌─[][root@parrot][/home/jason]
└──╼ #cat /etc/NetworkManager/system-connections/NetworkManager-USRP 
[802-3-ethernet]
duplex=full
 
[connection]
id=USRP
uuid=f6a7696d-4958-48f4-b1eb-c2ab9de0a838
type=802-3-ethernet
 
[ipv6]
method=auto
 
[ipv4]
method=manual
addresses1=192.168.10.1;24;0.0.0.0;

Here is how to get the passwords on Windows 7 or 8.1.

https://superuser.com/questions/424624/is-the-wifi-password-stored-somewhere-in-windows-7.

No comments have been made. Use this form to start the conversation :)

Leave a Reply