Search the VMware Knowledge Base (KB)
View by Article ID

Changing an ESXi/ESX host root password (1004659)

  • 48 Ratings
Language Editions


For security reasons, it may be necessary to change the password for the root user on an ESXi/ESX host after installation. This article provides steps to change the root password.


To change the ESXi/ESX host root user password:

Caution: Do not change the ESXi/ESX password when the ESXi/ESX host is connected to a Lab Manager Environment. For more information, see An ESX host is unavailable after its password is changed (1011209).

  1. Log in to the ESXi/ESX host service console, either via SSH or the physical console.

  2. If you did not log in as root, you must acquire root privileges by running the command:

    su -

    Enter the current root password when prompted.

  3. Change the root password by executing:

    passwd root

  4. Enter the new root password, and press Enter. Enter the password a second time to verify. You are warned about, but not prevented from using, bad passwords.

    If you make a mistake when typing or retyping the new root password, you must start over. For example:

    # passwd root
    Changing password for user root.
    New UNIX password:
    Retype new UNIX password:
    Sorry, passwords do not match
    New UNIX password:
    Retype new UNIX password:
    passwd: all authentication tokens updated successfully.
  • In ESXi 3.5 and later versions, reinstalling the ESXi software is the only supported way to reset a password if the root password is forgotten. Any other method may lead to a host failure or an unsupported configuration due to the complex nature of the ESXi architecture. ESXi does not have a service console, and the traditional Linux methods of resetting a password, such as single-user mode, do not apply.

  • If you have forgotten or do not know the password for the root user on an ESX host, you cannot recover the original password. However, you can change the root password. For more information, see Changing a forgotten root password on an ESXi/ESX host (1317898).

Additional Information

For more information on security best practices, see the VMware Technical Paper, VMware Infrastructure 3 Security Hardening.

For translated versions of this article, see:

See Also

Update History

07/30/2012 - Added additional note to the resolution section

Request a Product Feature

To request a new product feature or to provide feedback on a VMware product, please visit the Request a Product Feature page.


  • 48 Ratings

Did this article help you?
This article resolved my issue.
This article did not resolve my issue.
This article helped but additional information was required to resolve my issue.

What can we do to improve this information? (4000 or fewer characters)

Please enter the Captcha code before clicking Submit.
  • 48 Ratings