Develop > Command-Line Interfaces > opr-user Command-Line Interface

opr-user Command-Line Interface

You can use the opr-user command-line interface (CLI) to manually manage users, groups, and roles. For more information on users, groups, and roles, see Users, Groups, and Roles.

Location

<OMi_HOME>/bin/opr-user[.bat|.sh]

Synopsis

opr-user -help | -version | -example |<CONNECTION_INFO> <userRelatedOptions>

Exit Status

Exit Status

Description

Output

0

Successful completion of the requested operation

No output.
1

Failure of the requested operation

An error message stating why the operation failed, followed by the tool's help text.
300‑399

HTTP Redirection (300-399)

An error message stating the HTTP error number and description.

For more information about HTTP error status values, see publicly available HTTP documentation.

400‑499

HTTP Client Error (400-499)

500‑599

HTTP Internal Server Error (500-599)

Restrictions

  • Permissions. The user running the opr-user command-line interface must be an OMi user with super-administrative rights.

Examples

This section shows a number of examples you can use as a starting point for developing your own opr-user commands.

  • List current user groups with details:

    opr-user -username user -password passwd -list_user_groups -show_details

  • For each permission you want to assign to a role, select the resource key and the operation key from the output. For example, to assign permissions to the RTSM view "All My Windows Servers", identify the following keys:

    From the list of authorization resources:

    ResourceKey = rtsm-view.All My Windows Servers

    OperationKey = view

  • Create a role and configure the permissions identified in the previous step:

    opr-user -user username -pw password -add_user_role -name "Role with RTSM view CLI Tool" -description "Role with RTSM view CLI Tool" -add_permission -auth_resource "rtsm-view.All My Windows Servers" -operation view

    Tip Get the role ID from the output for later use, for example:

    UserRoleId = 8df36ec5-3829-41b7-a1b7-a86f-c31a3429d8

  • Create a user group and assign a role to the group. In this example, grant permissions to all LDAP users: