create_user
Creates a new Enterprise Manager administrator.
Standard Mode
emcli create_user
-name="name"[-password="password"][-type="type of user"]
[-roles="role1;role2;..."]
{-email="email1;email2;..."]
[-privilege="name[;secure-resource-details]]"]
[-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"]
[-external_user_id="external_user_id"]
[-tenant="tenant"]
[-like="like"]
[-input_file="FILE:file_path"]
[-separator="separator:attribute_name:character"]
[-subseparator="subseparator:attribute_name:character"]
[ ] indicates that the parameter is optionalInteractive or Script Mode
create_user(
name="name"
[,password="password"]
[,type="type of user"]
[,roles="role1;role2;..."]
[,email="email1;email2;..."]
[,privilege="name[;secure-resource-details]]"]
[,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"]
[,external_user_id="external_user_id"]
[,tenant="tenant"]
[,like="like"]
[,input_file="FILE:file_path"]
[,separator="separator:attribute_name:character"]
[,subseparator="subseparator:attribute_name:character"] )
[ ] indicates that the parameter is optionalOptions
-
name
Administrator name.
-
password
Administrator password.
-
type
Type of user. The default value of this option is EM_USER. Possible values for this option are:
-
EM_USER
-
EXTERNAL_USER
-
DB_EXTERNAL_USER
-
-
roles
List of roles to grant to this administrator. Currently, the built-in roles include
PUBLIC. -
email
List of e-mail addresses for this administrator.
-
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=SYSTEMTo retrieve the complete list of privileges and resource column names, execute the following command:
emcli get_supported_privilegesTo retrieve the list of TARGET privileges, execute the following emcli command:
emcli get_supported_privileges -type=TARGETTo retrieve the list of job privileges, execute the following emcli command:
emcli get_supported_privileges -type=JOB -
profile
Database profile name. It uses DEFAULT as the default profile name.
-
desc
User description for the user being added.
-
expired
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 of the administrator.
-
location
Location of the administrator.
-
external_user_id
External user ID of the administrator..
-
tenant
Tenant name of the administrator.
-
like
Create like another user.
-
input_file
Reads the contents of a file and passes as property value.
For more information about the input_file parameter, see -input_file Syntax Guidelines.
-
separator
By default, multi-value input attributes use a semicolon ( ; ) as a separator. Specifying this option overrides the default separator value.
Example:
separator="<attribute_name=sep_char>"whereattribute_nameis name of the attribute for which you want to override the separator character, andsep_charis the new separator character.Example:separator="att=#" -
subseparator
By default, multi-value input attributes use a colon ( : ) as a subseparator. Specifying this option overrides the default subseparator value.
Example:
subseparator="<attribute_name=sep_char>"whereattribute_nameis name of the attribute for which you want to override the separator character, andsep_charis the new subseparator character.Example:separator="att=#"
Exit Codes
0 if successful. A non-zero value indicates that verb processing was unsuccessful.
Examples
These examples create an Enterprise Manager administrator named new_admin. This administrator has two privileges: the ability to view the job with ID 923470234ABCDFE23018494753091111 and the ability to view the target host1.example.com:host. The administrator new_admin is granted the PUBLIC role.
Example 1 Command-Line
emcli create_user
-name="new_admin"
-password="oracle"
-email="first.last@example.com;joe.shmoe@shmoeshop.com"
-roles="public"
-privilege="view_job;923470234ABCDFE23018494753091111"
-privilege="view_target;host1.example.com:host"
Example 2 - Scripting and Interactive
create_user
(name="new_admin"
,password="oracle"
,email="first.last@example.com;joe.shmoe@shmoeshop.com"
,roles="public"
,privilege="view_job;923470234ABCDFE23018494753091111"
,privilege="view_target;host1.example.com:host")
These examples make User1 an Enterprise Manager user, which is already created on an external user store like the SSO server. The contents of priv_file are view_target;host1.example.com:host . User1 will have view privileges on the host1.example.com:host target.
Example 3 - Command-Line
emcli create_user
-name="User1"
-type="EXTERNAL_USER"
-input_file="privilege:/home/user1/priv_file"
Example 4 - Scripting and Interactive
create_user
(name="User1"
,type="EXTERNAL_USER"
,input_file="privilege:/home/user1/priv_file")