How to reset or recover the root password on a VMware vRealize 7.x appliance
search cancel

How to reset or recover the root password on a VMware vRealize 7.x appliance

book

Article ID: 326147

calendar_today

Updated On:

Products

VMware Aria Suite

Issue/Introduction

  • This article provides steps on how to reset a root password in vRealize Automation 7.x / vRealize Business 7.x.
  • This article can be used to recover a lost password, unlock existing or reset root account.
Notes:
  • In vRealize Business, the root password does not expire. This KB article still applies if the user does not remember the password.
  • You will not have access to SSH and VAMI interface (5480) without root password. vRealize Automation root password expires automatically after 365 days and admins may not be aware of it.


Environment

VMware vRealize Automation 7.x
VMware vRealize Business for Cloud Advanced 7.x
VMware vRealize Business for Cloud 7.6.x

Resolution

To reset the root password:
  1. Connect to vSphere Client and open the appliance virtual machine console.
  2. Go to VM > Power > Restart Guest to restart the appliance.
  3. Wait for the virtual machine to reboot.
  4. Press e when you see the GNU GRUB Menu appearing on the screen.
    Note:  There is a minor delay before the system will automatically begin booting.  Ensure the halt "e" button is pressed before this menu timeout.


     
  5. Press e again. The output will be similar to:


     
  6. Go down until you see a line beginning with linux /vmlinuz.
  7. Press "e" one last time to edit the end of this line, add the command:

    init=/bin/bash

    Example:

     
  8. Press "Enter" or "Return" on the keyboard then Press " b" to boot the /boot/vmlinuz that was previously edited.
  9. Once loaded you will be presented with a (none):/# shell.
  10. (Optional): Reset root password usage history and reset root expiration:
chage -M -1 root; echo "" > /etc/security/opasswd

Note: There are two parts to the above command: The first will reset the root expiration date to never expire.  Set this value based upon the company security policies. The second will echo a blank value into the password history file, purging previously used passwords.  This is necessary if you wish to re-use an old root password.
  1. (Optional) Validate the password is not locked out and unlock if necessary:
 
Note: The pam_tally2 module is configured to unlock the root account after 300 seconds, or 5 minutes.
pam_tally2 -u root
If locked:
pam_tally2 -u root --reset
  1. Type the command passwd to reset the root password.
     
    • On some appliance(s) you may receive this error due to the file system mounted in read only.

       
    • In such case, type the command "mount / -o remount,rw" and try again:


       
  2. After the reboot, attempt to access the VAMI interface with the new password.


Additional Information

The pam_tally2 module is configured to unlock the root account after 300 seconds, or 5 minutes.

How to reset the root password in vRealize Operations Manager