Skip to main content

userrole

Use the userrole program to add or remove users from a role.

Usage
userrole.exe -operation <ADD|DELETE> -optional -roleid <roleid> -userid <userid>

userrole.exe -csv <csv>

userrole.exe -kvg <kvg>

Argument

Description

-csv <csv>

The CSV file containing the user/role information.

-kvg <kvg>

The KVGROUP file containing the user/role information.

-operation <ADD—DELETE—LIST>

The operation; ADD for adding role membership for the user, DELETE for removing role membership for the user, and LIST for listing the roles the user has.

-optional

Adds optional members in the role if specified.

-roleid <roleid>

The role ID to be managed for the user.

-userid <userid>

The user ID to be managed for the role.

Examples
  1. To add user AUSER001 to the CORPROLE role:

    userrole -userid AUSER001 -roleid CORPROLE -operation ADD
  2. To add user AUSER001 to the CORPROLE role, along with optional sub-roles:

    userrole -userid AUSER001 -roleid CORPROLE -operation ADD -optional
  3. To remove user AUSER001 from the CORPROLE role:

    userrole -userid AUSER001 -roleid CORPROLE -operation DELETE
-kvg option

The -kvg option uses a KVGroup file containing the subgroup of user and role to be added. The file should be in the following format:

"" "" = {
     "user" "<profile id>" = {
   
         "roleid" = "<role id>" # role id as part of the change
         "operation" = "<ADD|DELETE>" # operation to perform with the role
         "optional" = "1" # optional; if present, the optional sub-roles are included
     }
     ...
 }
-csv option

The -csv option uses a CSV file that should be in the following format:

<userid>,<roleid>,<operation>[,<optional>]

where <optional> is 1 or 0 if present. A value of 1 means that sub-roles are included.