If you forget the password of the root user, you can no longer establish SSH connections or use the console of the vRealize Log Insight virtual appliance.

You might not be able to log in as root for various reasons including:
  • You have not changed the default password. By default, vRealize Log Insight sets a blank password for the root user and deactivates SSH access. Once the password is set, SSH access for the root user is activated.
  • You set an SSH key during the deployment of the vRealize Log Insight virtual appliance. If an SSH key is specified through OVF, then password authentication is deactivated. Either log in with the set SSH key or see the solution steps below.
  • You entered the password incorrectly multiple times and you are now temporarily locked out. In this case, entering the correct password will not get you in until the lockout period has elapsed. You can either wait or restart the virtual appliance.
Because the vRealize Log Insight virtual appliance resides on a Photon OS, the following steps describe how to reset the root password on a Photon OS machine.

Problem

If you cannot establish SSH connections or use the console of the vRealize Log Insight virtual appliance, you cannot accomplish some of the administration tasks, nor can you reset the password of the admin user.

Solution

  1. Restart the vRealize Log Insight virtual machine running Photon OS.
  2. As the Photon OS restarts and the splash screen appears, enter the letter e immediately to go to the GNU GRUB edit menu.
    Note: Because Photon OS reboots quickly, you will not have much time to enter e. In vSphere and Workstation, you might have to bring the console into focus by clicking the console window before it accepts input from your keyboard.
  3. In the GNU GRUB edit menu, at the end of the line that starts with linux, enter a space and add the following code:
    rw init=/bin/bash
  4. Press F10 to open the command prompt.
  5. Run the following command:
    passwd
  6. Follow the instructions to enter and reenter a new root password that conforms to the password complexity rules of Photon OS. Ensure that you remember the password.
  7. When you see a message saying that the password has been updated, run the following command:
    umount /
  8. Run the following command.
    reboot -f
    Note: You must include the -f option to force a reboot. Otherwise, the kernel enters a state of panic.

What to do next

After vRealize Log Insight reboots, validate that you can log in with the new root user password.