cancel
Showing results for 
Search instead for 
Did you mean: 
jeffdoug1
Mission Specialist
Mission Specialist
  • 2,511 Views

rd.break isn't working in RHEL9

Jump to solution

So what is the correct procedure to break into a system in the RHCSA testing environment so you can change the root password? I think have one more chance to take the test and I don't want to be caught with this again.

0 Kudos
1 Solution

Accepted Solutions
TheIF
Mission Specialist
Mission Specialist
  • 2,440 Views

Hi, @Tracy_Baker  suggests this

https://learn.redhat.com/t5/Platform-Linux/Reset-forgotten-root-password-in-RHEL9/m-p/34115#M1884

It applies to messed /etc/fstab too.

I'd like to add that instead of its 5th point ( touch /.autorelabel ), I rather use /usr/sbin/load_policy -i and then /usr/sbin/restorecon -vvRF /etc ( or whatever dir you made changes into ), it is way faster ; then, remount / readonly and then pull the plug

PATH is unset, so you have to call commands using absolute path

my 2 c

Study has no limit
Improvement has no limit.

View solution in original post

4 Replies
TheIF
Mission Specialist
Mission Specialist
  • 2,441 Views

Hi, @Tracy_Baker  suggests this

https://learn.redhat.com/t5/Platform-Linux/Reset-forgotten-root-password-in-RHEL9/m-p/34115#M1884

It applies to messed /etc/fstab too.

I'd like to add that instead of its 5th point ( touch /.autorelabel ), I rather use /usr/sbin/load_policy -i and then /usr/sbin/restorecon -vvRF /etc ( or whatever dir you made changes into ), it is way faster ; then, remount / readonly and then pull the plug

PATH is unset, so you have to call commands using absolute path

my 2 c

Study has no limit
Improvement has no limit.
huyvl3-fptcloud
Flight Engineer
Flight Engineer
  • 2,371 Views

(sorry my mistake)

jeffdoug1
Mission Specialist
Mission Specialist
  • 2,266 Views

Thank you for the link and for the extra information. 

I installed 9.0 onto my laptop and have tested the solution in the link.  It looks like adding rw in front of init=/bin/bash on the kernel line will work too as opposed to doing the mount -o rw,remount / at the bash-5.1# prompt. 

Do you know if there is anything listing the other differences specific to 9.0?  I can’t find anything online that specifically says, “here’s a list of things that work in other RHEL releases, but do not work in 9.0”.  Or something like that. 

0 Kudos
huyvl3-fptcloud
Flight Engineer
Flight Engineer
  • 2,370 Views

Hi @jeffdoug1, in RHEL v9.1 and 9.2 and 9.3 versions, you can apply "rd.break" to any line in the grub menu. But for v9.0 only, you must select the second line with the word "rescue" to be able to apply "rd.break", however if you accidentally select the first line (without the word "rescue"), you must apply the solution @Tracy_Baker described, @TheIF above mentioned that solution in the link.

I have experienced all 4 RHEL versions from 9.0 to 9.3 by downloading qcow2 and also iso.

Join the discussion
You must log in to join this conversation.