pvivek1085
Cadet
Cadet
  • 796 Views

reset password from rd.break not working

I am was unable to use the root password that i had reset by following the below  steps. I was getting login denied

1. On the Grub menu type e

2. edit the Linux16  with rd.break

3. hit Ctrl+x

4. mount -o rw,remount /sysroot

5.chroot /sysroot

6. passwd

7. Enter password again

8. echo / .autorelabel

Labels (1)
14 Replies
Tracy_Baker
Starfighter Starfighter
Starfighter
  • 90 Views

Actually, I noticed the same thing on my RHEL 9 (developer) system, too. It asks me for a password - even when using rd.break. I forgot about it until I saw this thread 'cause I haven't been messing with the new RHEL (RH124/RH134) labs . . . until this week.

I went to try and see if workstation (or servera or serverb) would work . . . until I found that the timeout on grub has been set to 0. So I have to go change that first...

...so yup, workstation stops and asks for a root password.

 

Program Lead at Arizona's first Red Hat Academy, est. 2005
Estrella Mountain Community College
benlimanto
Flight Engineer
Flight Engineer
  • 88 Views

Also Mr. Baker, I also got problem with grub2-mkconfig, do you also experience that /etc/default/grub, doesn't conveyed or rendered to /boot/grub2/grub.cfg and /boot/efi/EFI/redhat/grub.cfg ? I tried to change the timeout into 5 from 0 as on cloud lab, but it seems doesn't work as it intended and still stay at 0.

Teaching RHEL Curicullum @ stts.edu/istts.ac.id since 2019! Thanks for RH Academy !
0 Kudos
Tracy_Baker
Starfighter Starfighter
Starfighter
  • 72 Views

@benlimanto 

I'm not working in RH's cloud instances. I have the labs in my VMware Workstation. It should not, however, be any different as it should be using the same lab image (well... I'm using the one available from the Red Hat Academy Learning Portal and it is possible that the image they're using in their cloud is updated...)

Anyway, this is what I did (just to be complete):

edit /etc/default/grub and change GRUB_TIMEOUT=5

I then did both commands (because I didn't now how the VM was presented - is it BIOS or is it UEFI...?)

grub2-mkconfig -o /boot/grub2/grub.cfg
grub2-mkconfig -o /boot/efi/EFI/redhat/grub.cfg

OK, so I just did this in the lab space made available by Red Hat to the Red Hat Academy, and it worked fine. So, on to reset the password....

...first, remove the console directives and values (console=tty0 console=ttyS0,115200n8)...

...add rd.break...

...aaaaand it asks for root password.

So RH's RHA's lab space is also broken.

 

Program Lead at Arizona's first Red Hat Academy, est. 2005
Estrella Mountain Community College
0 Kudos
bball
Mission Specialist
Mission Specialist
  • 385 Views

Your step 4 is somewhat incorrect. I believe you need mount -o remount,rw /sysroot

Also, step 8 should be touch /.autorelabel, not echo, 

0 Kudos
Tracy_Baker
Starfighter Starfighter
Starfighter
  • 76 Views

2. edit the Linux16  with rd.break

This is also incorrect - for RHEL 8 and RHEL 9. The line now begins with linux

Please see this thread: https://learn.redhat.com/t5/Platform-Linux/Unable-to-reset-the-root-password-when-disabling-SELinux/...

Program Lead at Arizona's first Red Hat Academy, est. 2005
Estrella Mountain Community College
0 Kudos
Join the discussion
You must log in to join this conversation.