How to add a role to a user from the command line in RHEV?

Solution Verified - Updated -

Environment

Red Hat Enterprise Virtualization (RHEV) 3.x

Issue

How to add a role to a user from the command line?

Resolution

To add a role to a user, use the rhevm-shell on the management host.
For instance, in order to add the role 'Role1' to the user 'john' on the VM 'virtual1', run the commands below:

# rhevm-shell
[RHEVM shell (connected)]# add permission --vm-identifier virtual1 --role-id Role1 --user-id john

Diagnostic Steps

For additional information regarding rhevm-shell, refer to the document below:

How to connect to the rhevm-shell.

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.

Comments