Posted By

alfirth on 11/11/15


Tagged

password osx keychain


Versions (?)

Get password from keychain (OSX)


 / Published in: Bash
 

URL: http://hints.macworld.com/article.php?story=20130722033452283

Get password from keychain (OSX)

  1. get_pw () {
  2. security 2>&1 >/dev/null find-generic-password -ga $USER
  3. |ruby -e 'print $1 if STDIN.gets =~ /^password: "(.*)"$/'
  4. }

Report this snippet  

You need to login to post a comment.