7

I can add a password to the keyring like this:

security add-generic-password -a $USER -s my-password-entry -T /usr/bin/security -U -w

... and read it like this:

security find-generic-password -a $USER -s my-password-entry -g -w

But is there a way to make security ask for Touch ID verification every time I ask for my-password-entry?

References:

1 Answer 1

1

Yes, you can modify your command line to look like this when adding the password:

security add-generic-password -a $USER -s my-password-entry -T "" -U -w

This will ensure that no application is trusted to access the data without warning.

7
  • 1
    This makes it ask for my password, not fingerprint / Touch ID.
    – neu242
    Commented Mar 18, 2020 at 9:12
  • Hmm, odd - doesn't it allow you to either touch id or password? - Have you tried giving it the password the first time, and then try again and see if it will allow Touch ID? (usually touch id is not allowed just after a reboot for example)
    – jksoegaard
    Commented Mar 18, 2020 at 10:42
  • Are you using a MacBook Pro?
    – jksoegaard
    Commented Mar 18, 2020 at 10:42
  • 2
    I'm using a Macbook Pro 16". It will ask for password every time, until I select "Always allow". Then it won't ask for anything anymore. I want it to ask for Touch ID every time..
    – neu242
    Commented Mar 19, 2020 at 14:25
  • Are you on Catalina? - I'm on Mojave, maybe that makes a difference.
    – jksoegaard
    Commented Mar 19, 2020 at 14:32

You must log in to answer this question.

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