Effective Root Password Recovery in RHEL 9: Comparing Init=/bin/bash and rd.break Methods | Linux (4) #LinuxAdmin
Updated RHEL 9 Password Reset Process (due to changes in dracut
):
Press
e
to edit the GRUB boot options:- This step allows you to modify the boot options temporarily.
- In the
linux
line, changero
torw
(this is just beforecrashkernel
):
The root filesystem is mounted as read-only (
ro
) by default. Changing it torw
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
orlinuxefi
, then modifyro
torw
.
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
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