Skip to main content
Question

Editing Keychain - Changing Key Access Control through command line

  • December 19, 2018
  • 1 reply
  • 0 views

Forum|alt.badge.img+3

Hey,

I'm looking to how the following be achieved through command line (updating Access Control of the key):

Keychain Access --> System --> double click on the key --> Access Control tab --> change option to "Allow all applications to access this item" or add an application.

Thanks!

1 reply

mm2270
Forum|alt.badge.img+16
  • Legendary Contributor
  • 7880 replies
  • December 19, 2018

It's been a while since I've looked at this, but if I'm remembering correctly, that can only be set at the time a keychain entry is created when using the security command line tool. I don't believe you can make changes to it after the fact. But I would need to go back and look to be sure. In any event, you should check on the man page on security in Terminal for more information on how to use it.

Edit: I forgot that the security tool commands for add-generic-password and add-internet-password both have an "update" flag (-U), which supposedly updates an existing entry with new values, but in quick tests I've been unable to get that to work, at least when talking about changing the application access settings.


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings