How to Reset vCenter Root Password and Secure Environment

When you forgot the root password of vCenter, you may be annoyed. So to reset your root password quickly and without much effort, you only need to follow the instructions in this article.

Crystal

By Crystal / Updated on November 4, 2022

Share this: instagram reddit

Case of vCenter resetting root password

If the vCenter Server appliance is deployed without editing the root password in the Virtual Appliance Management Interface (VAMI), the default GRUB password is vmware, or if you have set your own password, you want to reset it due to the following cases:

  • Logging in to the root account of vCenter Server Appliance (VCSA) fails.
  • The root account of the vCenter Server Appliance is locked or account is expired.
  • The root account password has been lost or forgotten.

Today I will provide detailed steps to reset a lost, forgotten, or expired root password for a vCenter Server Appliance 6.x and 7.x, which also secures your passwords used by users on you VMware environment.

How to reset vCenter root password step by step

If the vCenter Appliance is on the same ESXi hosts it manages, connect directly to the ESXi host that it is located on to perform these steps. Here, I am running vCenter server version 6.7 as an example.

Tips: There is downtime required. In the downtime window reboot vCenter server.

To reset vCenter root password, you should:

1. Take a snapshot of the VM and proceed with forcing a reboot. Once the photon OS splash screen is showing, quickly press “e” to reveal the Grub boot menu. Then on the GNU GRUB menu, type rw init=/bin/bash after $systemd_cmdline.

open-gnu-grub-menu

2. Press F10 to boot.

3. This will now boot vCenter server appliance into root shell directly. To reset the password, you can enter the following command and provide a new root password (twice for confirmation).

passwd

4. Unmount the filesystem by running this command (yes, the unmount command is umount  -  it's not a spelling error):

umount /

5. Reboot the vCenter Server Appliance by running this command:

eboot -fr

Tips: While resetting root password, make sure you are not using dictionary word for password or you may end up into failed message - passwd: Authentication token manipulation error with password unchanged.

reset-vcenter-root-password

6. Access the vCenter Server Appliance using the new root password. If connection is successful, you can delete snapshot from VM.

7. You could set the Root password to never expire in order to prevent this issue by running command:         # chage -I -1 -m 0 -M 99999 -E -1 root  or at the VAMI  ( https://:5480)

Quick tips to reset vCenter 7.0 root password

If you are using vCenter version 6.7 P03 or 7 U1 and above, this is another quick way of change password of root user, if you already know it without downtime using VAMI portal.

1. Open vCenter VAMI portal with 5480 port. Use your SSO admin or [email protected] username and password to login.

open-vcenter-server-management

2. Click on the Actions on the menu, from dropdown list choose Change Root Password. If you finish resetting vCenter root password, click Save.

change-root-password

These steps secure your vCenter environment. In order to protect your virtual environment better, you should make a VMware backup solution to safeguard your virtual machine data.

How to easily backup multiple virtual machines under vCenter

We have discussed vCenter backup before. As we know, vCenter can manage a large number of virtual machines, but to offer complete VM protection, many IT staff prefer a specialized backup software such as AOMEI Cyber Backup, a VMware backup software, which is professional and reliable for VMware ESXi virtual machine backup.

With AOMEI Cyber Backup, you can enjoy these features easily.

Centralized VM Backup: independent image-level VM backups can be used to create new VMs.
 Batch vSphere Backup: batch backup large numbers of VMs managed by vCenter Server, or multiple VMs on a standalone ESXi host.
Automated Execution: create backup schedules to automate virtual machine protection.
Restore Entire VM: restore immediately available VMs from any selected restore points.

AOMEI Cyber Backup

AOMEI Cyber Backup supports VMware ESXi 6.0 and later versions. Next, I will demonstrate how to perform backup of multiple VMware ESXi VMs. You can click the following button to download the 30-day free trial.

Download Free TrialVMware ESXi & Hyper-V
Secure Download

4 simple steps to backup multiple vCenter VMs

1. Bind Devices: Access to AOMEI Cyber Backup web client, navigate to Source Device > VMware > + Add VMware Device to Add vCenter or Standalone ESXi host. And then click > Bind Device.

Bind device

2. Create Backup Task: Navigate to Backup Task > + Create New Task, and select VMware ESXi Backup as the Backup Type.

VMware ESXi backup

3. Set Task Name, Device, Target, Schedule, and Cleanup as needed.

▶ Device: navigate to the vCenter Server and select a datastorecenter, it will show all the VMs on the right pane. With one click, you can easily backup multiple virtual machines.

Select virtual machines vCenter

▶ Target: selecting to back up to a local path, or to a network path. Used paths will be saved in Favorite Storage for handy selection.

select backup target

▶ Schedule (optional): performing full, differential or incremental backup, and automate execution daily, weekly or monthly according to the frequency you specified.

schedule VM backup

▶ Backup cleanup (optional): Configure a retention policy to auto delete old backup files and save storage space.

backup cleanup

▶ Start Backup: You can click Start Backup and select to Add the schedule and start backup now, or Add the schedule only.

Start Backup

4. Restore: Click Restore to recover a virtual machine from backup, saving the trouble of re-configuring the new VM.

Once the backup task is created, it will be executed automatically according to your schedule. If you want to restore a virtual machine, you can click Restore and choose to restore entire VM to an available state from any historical restore point. In addition to restoring a VM to its original location, you can also choose Restore to new location, which will create a new, identical VM directly from your backup to the target location.

restore VM

Summary

If you came across vCenter Server in your infrastructure where root password was not working, you may think of how to reset vCenter root password. This article provides the process of resetting the root password of VCSA quickly when it is forgotten or failed to boot.

Besides, if you forget the root password of VMware ESXi host, you can use Host Profile and “shadow” file to reset ESXi root password.

Crystal
Crystal · Editor
Crystal is an editor from AOMEI Technology. She mainly writes articles about virtual machine. She is a positive young lady likes to share articles with peolpe. Off work she loves travelling and cooking which is wonderful for life.