How to find Wi-Fi password when it’s not saved in the keychain but Mac automatically connects to it


My Mac laptop automatically connects to a Wi-Fi access point every time I switch it on.

When I go to Keychain Access to check the password; I enter the system password as prompted and click Allow. But when i check the box Show Password the check suddenly disappears and NO PASSWORD is shown. It stays blank.

How do I retrieve the password for the access point?

Best Answer

To exclude a malfunction of Keychain, you could try the security command in Terminal (to be found in /Applications/Utilities/, or search with Spotlight):

security find-generic-password -D "AirPort network password" -l "network name" -w

Replace "network name" (without the quotes) with the wireless network's actual name.
Hit enter and a window will pop up and ask for administrator credentials.
Enter those and click "Allow" to find the password as output in Terminal.