How To Unlock The Root Account On VMware Photon OS

In this tutorial, we will explore the steps to unlock and reset the root account on VMware Photon OS. VMware Photon OS is a minimal Linux-based operating system designed for cloud-native applications and container management. The root account is a privileged account that has unrestricted access to the system and is used for administrative purposes. However, due to security reasons, the root account is locked by default, and you need to unlock it to perform certain tasks.

Whether you are a seasoned administrator or a beginner, this tutorial will provide you with the necessary information to get the job done. So, let’s dive in and learn how to unlock and reset the root account on VMware Photon OS.

Here are the steps.

  1. Reboot or Power on the appliance and wait for the Photon OS splash screen during boot.
VMware Photon OS Splash Screen
  1. At the Photon OS splash screen you will have a few seconds to press e to enter the GNU GRUB editor.
  1. At the GNU GRUB editor add the following to the end of the line that begins with ‘linux’:
    rw init=/bin/bash
  1. Enter F10 or Ctrl-x to continue booting into single-user mode.
  1. Next we need to remount the root partition with the ability to write to it.
    At the prompt enter: mount -o rw,remount /
  1. Use the passwd command to reset the root password.
  1. Additionally, if the root account is locked from too many failed login attempts, use the following command to unlock it: /sbin/pam_tally2 -r -u root
  1. Unmount the root partition: umount /
  1. Reboot the appliance: reboot -f

The root account should now be unlocked allowing you to log in again.

Learn how to unlock the root account on RHEL/CentOS here.

Tags :

Leave a Reply

Your email address will not be published. Required fields are marked *