VMWare and Sudo
Below is how to setup sudo access for users on VMWare ESX servers. This is standard for any Linux distribution. Just for reference, VMWare ESX v* runs on top of Redhat Linux.
[___ @vm]# cat /etc/redhat-release
Red Hat Enterprise Linux ES release 3 (Taroon)
First, su to root
[user@vm03 user]$ su -
Password:
Next, edit /etc/sudoers
[___ @vm]# vi /etc/sudoers
For an individual user, add the following
user ALL=(ALL) ALL
Or you can setup a group and all users within will inherit sudo rights
%admins ALL=(ALL) ALL
Save the configuration with vi hit escape then type “:wq!” and enter.
Test
[user@vm03 user]$ sudo su -
Password:
[vm]# whoami
root
Note: This will allow the user to become or execute commands as root without needing to know the root password. Still, the user will be prompted for their password when they use sudo. More granular access is possible allowing users to execute only specific commands. If you want to bypass all password authentication (not a good idea) for sudo access, you can use NOPASSWD.
user ALL=(ALL) NOPASSWD: ALL

Leave a Reply