F Setting Preferred Credentials Using EM CLI

When you provide the agent credentials, you can choose to enter the preferred credentials registered with the Enterprise Manager system. However, ensure that the credentials were registered using EM CLI.

  • To register the credentials as preferred credentials for one host at a time, run the following command on the host where the Management Agent is running:

    emcli set_credential -target_type=host -target_name="<host_name>" -credential_set=OHCreds -column="OHUsername:<em_job_user>;OHPassword:<em_job_pwd>" -oracle_homes="<agent_home>"

    For example,

    emcli set_credential -target_type=host -target_name="example.com" -credential_set=OHCreds -column="OHUsername:myuser;OHPassword:2bornot2b" -oracle_homes="/home/john/programs/EM/agent10g"

  • To register the credentials as default preferred credentials for all hosts at a time, run the following command on one of the hosts where the Management Agent is running. Ensure that the user is a shared user on all the hosts.

    emcli set_credential -target_type=host -credential_set=OHCreds -column="OHUsername:<em_job_user>;OHPassword:<em_job_pwd>" -oracle_homes="<agent_home>"

    For example,

    emcli set_credential -target_type=host -credential_set=OHCreds -column="OHUsername:myuser;OHPassword:2bornot2b"

Note:

To run these commands, you must have the EM CLI Client installed on the hosts. If you do not have EM CLI, install one following the instructions outlined in Oracle Enterprise Manager Command Line Interface Guide.