colindunn
Contributor
Contributor

vimsh / vmware-vim-cmd to add role - privilege names?

I'm trying to write a bash script that uses the vimsh vimsvc/auth/role_add command to create a role and add privileges to it.

The syntax of the command is shown to be:

vimsvc/auth/role_add rolename priv0 priv1 ... privn

So my question is: Is there a document that lists the privilege names? I found some sample code on the net, but the privilege names don't exactly match the names shown in the Virtual Infrastructure Client GUI.

0 Kudos
1 Reply
lamw
Community Manager
Community Manager

This is unsupported and undocumented command .. having said that, you can do a whole bunch of cool stuff with vimsh.

Specifically for role modification, its best that you manually add the roles and then run a query to see what the role names are and you also will get a lot of that by just looking at what changes in the following file: /etc/vmware/hostd/authorization.xml which is used to keep track of this info on an individual ESX host

=========================================================================

William Lam

VMware vExpert 2009

VMware ESX/ESXi scripts and resources at:

Twitter: @lamw

VMware Code Central - Scripts/Sample code for Developers and Administrators

VMware Developer Comuunity

If you find this information useful, please award points for "correct" or "helpful".

0 Kudos