Last Updated: February 25, 2016
· jacaetevha

Forgotten passwords on Mac

If you allow your browser to save passwords on your Mac, you can easily find out what that password is using the security command at the command line.

security find-internet-password -a <your user name> -s <the domain> -g | tr -d '\n'

For instance, if I wanted to see what my password is for my GitHub account (provided that I saved that information in my Keychain) I would enter this at the command line:

security find-internet-password -a jacaetevha -s -g | tr -d '\n'