security keychain commands

Manage the macOS keychain.

Syntax
   Display or manipulate the keychain search list.
      list-keychains [-h] [-d user|system|common|dynamic] [-s [keychain...]]

   Display or set the default keychain.
      default-keychain [-h] [-d user|system|common|dynamic] [-s [keychain]]

   Display or set the login keychain.
      login-keychain [-h] [-d user|system|common|dynamic] [-s [keychain]]

   Create keychains and add them to the search list.
      create-keychain [-hP] [-p password] [keychain...]

   Delete keychains and remove them from the search list.
      delete-keychain [-h] [keychain...]       

Options
   -d    Use the specified preference domain.

   -h    Display help.

   -s    Set the login keychain to the specified keychain.
         Unset it if no keychain is specified.

   -P            Prompt the user for a password using the SecurityAgent.

   -p password   Use password as the password for the keychains being created.
                 If neither -P or -p password are specified, the user is prompted for
                 a password on the command line.

“Security is mostly a superstition. It does not exist in nature, nor do the children of men as a whole experience it. Avoiding danger is no safer in the long run than outright exposure. Life is either a daring adventure, or nothing” ~ Helen Keller

Related macOS commands

Local man page: security - Command line help page on your local machine.
security - Administer Keychains, keys, certificates and the Security framework.


 
Copyright © 1999-2025 windevcluster.com
Some rights reserved