4

According to many pages, it should be easy to retrieve command line a password using security.

I tried several options without success:

enter image description here

$sudo security list-keychains  
    "/Library/Keychains/System.keychain"
$sudo security find-generic-password -s "proxy_test"
    The specified item could not be found in the keychain.
$sudo security find-generic-password -s "proxy_test" -a "collector" -g
    The specified item could not be found in the keychain.
$sudo security find-generic-password -s "socks://proxy_test"
    The specified item could not be found in the keychain.
$sudo security find-key -s "proxy_test"
    The specified item could not be found in the keychain.
$sudo security unlock "login"
...
$sudo security find-key -s "proxy_test"
    The specified item could not be found in the keychain.
...
long etc. with sudo/without sudo.
1
  • 1
    sudo security find-internet-password -gs proxy_test - Try this ?
    – Udhy
    Feb 24, 2020 at 15:58

1 Answer 1

4

Seems proxy as part of internet, require another command:

security find-internet-password -s "proxy_test" -g
4
  • 3
    See the "Kind" column :-)
    – nohillside
    Feb 24, 2020 at 15:59
  • 1
    I was writing in the comment box, but you figure out your answer quickly :)
    – Udhy
    Feb 24, 2020 at 16:00
  • 1
    You can still publish your answer an I would accept it. I know it's not a big reward anyway. Thank you Feb 24, 2020 at 16:05
  • @AdrianMaire: It's fine as people will see your answer as a solution which should be enough for this community.
    – Udhy
    Feb 24, 2020 at 16:08

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .