Changing the ESXi host root password
search cancel

Changing the ESXi host root password

book

Article ID: 318960

calendar_today

Updated On:

Products

VMware vSphere ESXi

Issue/Introduction

This article provides steps to change the root password on an ESXi host.

Environment

VMware ESXi 6.X
VMware ESXi 7.X
VMware ESXi 8.X

Resolution

Using the Direct Console User Interface (DCUI):

  1. Connect a monitor and keyboard directly to the ESXi host; or access the remote management interface via iDRAC, iLO, etc.

  2. At the ESXi welcome screen, press F2 to access the System Customization menu.

  3. Log in as the root user with the current password.

  4. Navigate to "Configure Password".

  5. Follow the prompts to enter and confirm the new password.

  6. Exit the DCUI after successfully changing the password.

Using the ESXi Shell:

  1. Log in to the ESXi host console via SSH or the physical console.
     
  2. Log in as root and enter the current root password when prompted.
     
  3. Change the root password:
    $ passwd root
     
  4. Enter the new root password and press Enter. Enter the password a second time to verify. There may be a warning about being prevented from using bad passwords.

    If a mistake was made when typing or retyping the new root password, restart the process. 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.

Additional Information

Note:

If the root password is forgotten, refer to Reset ESXi Root Password with Host Profile.