update_password

Updates passwords or other credentials for a given target.

Format

emcli update_password
        -target_type="ttype"
        -target_name="tname"
        -credential_type="cred_type"
        -key_column="column_name:column_value"
        -non_key_column="col:oldvalue:newvalue;..."
        [-input_file="tag1:file_path1;tag2:file_path2;..."]

[ ]  indicates that the parameter is optional

Options

  • target_type

    Type of target.

  • target_name

    Name of the target.

  • credential_type

    Credential type to use. The type must be a base type, not a derived type. A derived type contains the XML tag <CredentialTypeRef> within its definition.

  • key_column

    Name and value of the key column for the credential type. Usually, the key column represents the user name. To get the key column for a target type, you can execute following EM CLI verbs:

    emcli show_credential_type_info — Displays key columns for all target types.

    emcli show_credential_type_info -target_type=<target_type> — Displays key columns for a specific target type.

  • non_key_column

    Name, old value, and new value of the non-key column(s) to modify. Usually, this is the name of the password column. Alternatively, a tag from the -input_file argument can be used so that the credential values are not seen on the command line. You can specify this option more than once.

  • input_file

    Path of the file that has non_key_column argument(s). This option is used to hide passwords. You must accompany each path with a tag that is referenced in the non_key_column argument. You can specify this option more than once.

    You can obtain the list of columns and the credential types they belong to by using the emcli show_credential_type_info command.

    For more information about the input_file parameter, see -input_file Syntax Guidelines.

Examples

Example 1

emcli update_password
          -target_type=oracle_database
          -target_name=myDB
          -credential_type=DBCreds
          -key_column="DBUserName:joe"
          -non_key_column="DBPassword:oldPass:newPass"
          -non_key_column="DBRole:normal:sysdba"

Example 2

In This example, FILE1 is a tag used to refer to the contents of passwordFile. The contents of the password file is:

DBPassword:oldPass:newPass;DBRole:normal:sysdba

Note that this example has the same effect as Example 1.

emcli update_password
          -target_type=oracle_database
          -target_name=myDB
          -credential_type=DBCreds
          -key_column="DBUserName:joe"
          -non_key_column="FILE1"
          -input_file="FILE1:passwordFile"