modify_user
Modifies an existing Enterprise Manager administrator.
Format
Standard Mode
emcli modify_user -name="name" [-password="password"] [-type="type of user"] [-roles="role1;role2;..." [-email="email1;email2;..."] [-privilege="name[;secure-resource-details]]"] [-separator="privilege="sep_string""] [-subseparator="privilege="subsep_string""] [-profile="profile_name"] [-desc="user_description"] [-expired="true/false"] [-prevent_change_password="true/false"] [-department="department_name"] [-cost_center="cost_center"] [-line_of_business="line_of_business"] [-contact="contact"] [-location="location"]
Interactive or Script Mode
modify_user( name="name" [,password="password"] [,type="type of user"] [,roles="role1;role2;..."] [,email="email1;email2;..."] [,privilege="name[;secure-resource-details]]"] [,separator="privilege="sep_string""] [,subseparator="privilege="subsep_string""] [,profile="profile_name"] [,desc="user_description"] [,expired="true/false"] [,prevent_change_password="true/false"] [,department="department_name"] [,cost_center="cost_center"] [,line_of_business="line_of_business"] [,contact="contact"] [,location="location"] ) [ ] indicates that the parameter is optional
Options
-
name
Administrator name.
-
password
Replaces the administrator password with the specified password.
-
type
Converts to the specified type of user. Possible values for this parameter are EM_USER, EXTERNAL_USER, and DB_EXTERNAL_USER. The Default value of this parameter is EM_USER.
-
roles
Replace current roles with the specified list of Enterprise Manager roles to grant to this administrator. Currently, the built-in roles include PUBLIC.
-
email
Replaces current email addresses for this administrator with the specified list. To delete all email addresses for this administrator, specify an empty string.
-
privilege
Privilege to grant to this administrator. You can specify this option more than once. Specify <secure_resource_details> as:
resource_guid|[resource_column_name1=resource_column_value1[:resource_column_name2=resource_column_value2]..]"
To retrieve the list of SYSTEM privileges, which do not require resource information, execute the following emcli command:
emcli get_supported_privileges -type=SYSTEM
To retrieve the complete list of privileges and resource column names, execute the following command:
emcli get_supported_privileges
To retrieve the list of TARGET privileges, execute the following emcli command:
emcli retrieve -type=TARGET
To retrieve the list of job privileges, execute the following emcli command:
emcli get_supported_privileges -type=JOB
-
separator
Specify a string delimiter to use between name-value pairs for the value of the -privilege option. The default separator delimiter is ";".
-
subseparator
Specify a string delimiter to use between name and value in each name-value pair for the value of the -privilege option. The default subseparator delimiter is ":".
-
profile
Database profile name. It uses DEFAULT as the default profile name.
-
desc
User description for the user being modified.
-
expired
Valid values are true or false. Use this option to expire the password immediately. The default is false.
-
prevent_change_password
Valid values are true or false. When set to true, you cannot change your own password. The default is false.
-
department
Name of the department of the administrator.
-
cost_center
Cost center of the administrator in the organization.
-
line_of_business
Line of business of the administrator.
-
contact
Contact information for the administrator.
-
location
Location of the administrator.
Exit Codes
0 if successful. A non-zero value indicates that verb processing was unsuccessful.
Examples
Example 1
This example modifies the new_admin
administrator. The user will have two privileges: to view the job with ID 923470234ABCDFE230184947530911111
and to view the target host1.example.com:host
. The user will also be granted role PUBLIC
. The user email addresses will be set to first.last@example.com
and joe.shmoe@shmoeshop.com
.
emcli modify_user -name="new_admin" -password="oracle" -email="first.last@example.com;joe.shmoe@shmoeshop.com" -roles="public" -privilege="view_job;923470234ABCDFE230184947530911111" -privilege="view_target;host1.example.com:host"
Example 2
This example deletes all the email addresses and privileges for administrator new_admin
. Note that -privilege=""
and -privilege
are equivalent if specified at the command line in a UNIX shell.
emcli modify_user -name="new_admin" -email=" -privilege=""