Does anyone know how to view passwords in Terminal? Maybe by accessing the Keychain data or something? I want to be able to view passwords in Terminal with just a series of commands.
Check out the
security command. You can get detailed information about its use by reading its man entry
An in-depth article on the
securitycommand is here.
Suppose we are talking about an internet password of a site. Then you would input:
security find-internet-password -gs www.paypal.com
On the other hand if we are talking about a generic password, we use the command
security find-generic-password -gs www.test_site.com
-g: is used to display the password for the item found
-a account_name: matches the account name given
-s server: matches teh server string