How to reset the root password on a VMware Tanzu Kubernetes Grid Integrated Edition Management Console (TKGI MC) VM.
search cancel

How to reset the root password on a VMware Tanzu Kubernetes Grid Integrated Edition Management Console (TKGI MC) VM.

book

Article ID: 386758

calendar_today

Updated On:

Products

VMware Tanzu Kubernetes Grid Integrated Edition

Issue/Introduction

This article explains how to reset the root password if it expires or is lost. 

Resolution

Prerequisites

  • You must have a valid snapshot or backup of the VM. 

Procedure

1. Restart gracefully the TKGi MC VM and wait for the Photon OS Splash screen during boot.

2.Enter 'e' to access GNU GRUB boot menu editor.

3. Add the below string behind the line that starts with linux: init=/bin/bash

4. Enter F10 to boot the changed Entry.

5. Verify if the OS filesystem is mounted as writable. See  /dev/sda2 on / type ext4 (rw,relatime) at the last line (/dev/sda2 might be different in your installation).

6. (Optional) Remount the filesystem as read/write 

mount -o rw,remount /

7. Reset root password with the passwd command. 

8. Reboot the appliance with the reboot -f command.