Hello
I have added a new user to the group users.
then I have put this line into /etc/sudoers:
%testuser ALL=NOPASSWD:/usr/bin/sudo, /bin/bash, /usr/bin/vim, /usr/bin/vimsh, /usr/bin/vmware-vimsh, /usr/bin/vmware-vim-cmd, /usr/bin/vmware-cmd
also i have edited the /etc/security//access.conf with +:testuser:ALL
But when I run the command vmware-vim-cmd vmsvc/getallvms I get the error Failed to login: vim.fault.NoPermission.
What do I have to do?
thx
hansi
The error you are getting is because you do not have permission to run that evelated command.
Okay so just to confirm you are runing the command like
sudo /usr/vmware/bin/vmware-vim-cmd vmsvc/getallvms
Then you enter the password..
also he easiest way I found to allow users to run elevated commands is to add the user you created to weels group and remove the hash of wheel and remove the line you created in /etc/sudoers example
## Allows people in group wheel to run all commands
%wheel ALL=(ALL) ALL
you can add the user to wheel group with the following command
usermod -G wheel username
Why are you doing this via the console? ..... I would recomend using Powercli becuase as you continue to upgrade your version of ESX there will be no console to login ..
hello
many thanks
now it works.
i have esx4.1 - on the next version is no console more?
I am running a shutdown-shell-script.
hansi
IMHO I suggest to start using PowerCLI or vMA to build your scripts