Effective Root Password Recovery in RHEL 9: Comparing Init=/bin/bash and rd.break Methods | Linux (4) #LinuxAdmin

Karthi SKarthi S
1 min read

Updated RHEL 9 Password Reset Process (due to changes in dracut):

  1. Press e to edit the GRUB boot options:

    • This step allows you to modify the boot options temporarily.

  1. In the linux line, change ro to rw (this is just before crashkernel):
  • The root filesystem is mounted as read-only (ro) by default. Changing it to rw ensures that the root filesystem is mounted as read-write, allowing you to make changes such as modifying the root password.

  • Find the line starting with linux or linuxefi, then modify ro to rw.

Press Ctrl + e to go to the end of the linux line and add /init=/bin/bash:

  • This bypasses the default system initialization process and brings you directly into a Bash shell in the root environment, allowing you to troubleshoot or reset the password.

  • This method is a substitute for the traditional rd.break approach.

for continuity refer below link

https://www.sws-international.com/?p=494

0
Subscribe to my newsletter

Read articles from Karthi S directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Karthi S
Karthi S

Evolving around Devops and multi-cloud. Cloud - AWS/Azure Container & orchestration -> Docker & Kubernetes Automating -> golang/shell scripting Certified AZ900 | AZ104 | RHSCA