Posts

Showing posts with the label Root Password Reset

How to Reset Root Password on Rocky Linux 9/10, RHEL 9, CentOS Stream: GRUB Guide

Image
Losing or forgetting the root password can lock you out of a Linux system entirely. This guide explains how to safely reset the root password on RHEL-based distributions (RHEL, CentOS, Rocky Linux) using the GRUB recovery method. The demonstration uses Rocky Linux, but the same steps apply to all RHEL-based distributions. Please Note:  This guide is intended for system owners or administrators with authorized access to the system. This method requires direct console access (physical or virtual) to the system. It cannot be performed over SSH. For encrypted systems, the LUKS passphrase is still required to unlock the disk before proceeding. Step 01:  Access GRUB Edit Mode Reboot the system (VM: power cycle; physical: shutdown -r if you have sudo). At the GRUB boot menu , press E    (or Shift during boot if hidden) and select the first entry (latest kernel) with arrows if needed. Step 02:  Modify Kernel Parameters Locate the kernel line that starts with linux or li...