by Paul Arnote (parnote)
PCLinuxOS, and Linux in general, is pretty good about remembering the passwords for our wifi connections. In fact, it may be too good. Usually, once we enter a valid password for a particular wifi connection, we rarely -- if ever -- have to enter it again. That ability to remember wifi connection passwords can also aid us in forgetting them, which can lead to some frustrating moments when it comes time to recall them.
Maybe you just forgot the password(s). And, who could blame you if you did? Or, maybe you want or need to share your wifi connection with guests, but can't remember the password. Hopefully, you're using complex passwords that can't easily be guessed, either. Plus, let's hope you're using WPA/PSK, and not WEP, for wifi security. WEP can typically be "broken" in less than 60 seconds by a determined and modestly intelligent hacker. While WPA/PSK is not immune from being hacked, doing so requires a LOT more work. A typical hacker will most likely move on to an easier target.
Fortunately, there are a couple of ways to "rediscover" your saved wifi connection passwords. Let's start by taking a look at the graphical way to recover them.
Open the PCLinuxOS Control Center. Click on the "Network Center" icon.
Now, click on the caret next to the connection you want to use. In this case, it should be your wifi connection. Select the wifi connection, and then click on the "Configure" button.
The fourth item down in the new window is labeled "Encryption key." Just beneath that, on the left side of the window is a checkbox labeled "Hide password."
Uncheck the checkbox, and the password for your selected wifi connection will be displayed. (My information is blocked from your view, for obvious reasons).
Of course, this being Linux, there is more than one way to "rediscover" your wifi connection passwords. Let's take a look at how to do it from the command line.
Of course, you can't access the information as a regular user, so you will have to issue the command as the root user.
As the root user, enter grep psk= /etc/wpa_supplicant.conf at the command line.
Displayed (and blocked out for your viewing pleasure) will be all of the wifi connection passwords you've used at the bottom of the output. The passwords are not listed with the particular network they are associated with, at least by using this command.
Using the command tail -n22 /etc/wpa_supplicant.conf (as the root user) will give me not only the wifi connection passwords stored on my computer, but also give me the SSID of the wifi network connection that each password is associated with. You may need to use a number larger than 22 (number of lines at the end of the file to display) if you have more wifi connections stored in wpa_supplicant.conf than the three that I have stored.
Now if you're thinking that there is an inherent security liability from storing the wifi connection passwords in unencrypted text files, you might be right if access was open to all who wished to view it. But, the information is only available to the root user. So, if anything, this illustrates that you need to be careful about who has access to the root account. Graphically or from the command line, the information is only accessible by the root user.
As far as I know, none of this information is useful to help you crack or hack a wifi connection password you do not already have access to or been granted access to. For that, there are other tools you can use or try, with variable success.