Open topic with navigation
Configuring root or non-root login
You must configure both your source and target ESX servers to allow either root or non-root login. If you are not using VirtualCenter, you must use root account credentials. If you want to use non-root credentials, VirtualCenter is required. In addition to using non-root credentials, VirtualCenter allows you to use VMotion to move the virtual machine.
- Root account login—If you are not using VirtualCenter, you must use root account credentials.
- Login to the host ESX server using root credentials.
- Using a text editor, open the file /etc/ssh/sshd_config.
- Locate the line PermitRootLogin no and change it to PermitRootLogin yes.
- Save the configuration file.
- From a command line, enter the following command service sshd restart, which will restart the SSH service.
- Non-root account login—If you want to use non-root credentials, VirtualCenter is required. In addition to using non-root credentials, VirtualCenter allows you to use VMotion to move the virtual machine.
- Login to the host ESX server as root.
- Use the sudo command to transition to the root.
- Use the adduser <username> command to create a new user.
- Execute visudo to modify the sudo configuration file (/etc/sudoers). Do not modify the file directly.
-
Add the following line to the configuration file.
username ALL=(ALL) NOPASSWD: ALL
- Save the file and exit (:w!).
- Logout and log back in as a sudo account.
-
Execute the following command to make sure you can access VMware datastores on /vmfs/volumes. If the command succeeds (prints the counts of the root home folder), then sudo is configured correctly. If it fails with a permission denied error or prompts for a password, then sudo is misconfigured.
sudo ls ~root