Displaying a Wi-Fi password under OS X

If you need to know a saved wireless network password on a system running Apple's OS X operating system, e.g. a MacBook Pro, you can do find that information using the Keychain Access program found in Applications/Utilities. To find the information using that utility, open it, then click on Edit then Find and search for the SSID for the wireless router or click on Passwords under Category in the left pane of the window and look for it in the list you will see.

Keychain Access - Arris

Double-click on a system or login entry for the relevant wireless network.

Arris-0142

Click on the check box next to "Show password" to reveal the password, i.e. the Wired Equivalent Privacy (WEP), Wi-Fi Protected Accesses (WPA), or Wi-Fi Protected Access II (WPA2) key. You will then be prompted for the "login" keychain password. Provide it and click on Allow.

Generic Category (English)120x600

Keychain Access password

You will then be able to see the WEP/WPA/WPA2 key.

Keychain Access Arris-0142 password

You can also obtain the password/key from a command-line interface (CLI). e.g. with the Terminal application also found in the Applications/Utilities directory, using the security command with the find-generic-password option.

     find-generic-password [-h] [-a account] [-s service] [-options...] [-g]
     [-keychain...]
            Find a generic password item.

            -a account      Match account string
            -c creator      Match creator (four-character code)
            -C type         Match type (four-character code)
            -D kind         Match kind string
            -G value        Match value string (generic attribute)
            -j comment      Match comment string
            -l label        Match label string
            -s service      Match service string
            -g              Display the password for the item found
            -w              Display the password(only) for the item found

E.g., suppose I wished to find the WiFi password for a router that uses an SSID of Xanadu, I could use the command security find-generic-password -ga "Xanadu" | grep "password:".

You will see a window stating "OS X wants to make changes. Type an administrator's name and password to allow this." Provide a username and password with administrator access to the system so that the "System" keychain can be accessed.

OS X wants to make changes

When you provide the needed credentials, you will see the password displayed.

$ security find-generic-password -ga "Xanadu" | grep "password:"
password: "4255512a"

 

TechRabbit ad 300x250 newegg.com

Justdeals Daily Electronics Deals1x1 px