Changing an ESXi host root password
search cancel

Changing an 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.

​​​​​​​For security reasons, it may be necessary to change the password for the root user on an ESXi host after installation.

Environment

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

Resolution

  1. Log in to the ESXi 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.
    #

 

Additional Information

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



Note:

If Root password is forgotten, then you may refer Reset ESXI password through Host Profile.