0

I am trying to reset the root password on a rhel 7 machine

Following one of the many articles online

I first hit 'e' to get into edit mode

However after I do that is asks for a username and password?

What am I doing wrong?

I have tried putting in random passwords for root, however all it will do is reboot the machine back to the grub menu

Server is running on VMware 6.7

enter image description here

enter image description here

Mike Meidl
  • 115
  • 1
  • 8
  • 1
    looks like password protection has been enabled for grub menu: https://help.ubuntu.com/community/Grub2/Passwords – Tom Oct 14 '20 at 16:16
  • @TomH anyway around that? – Mike Meidl Oct 14 '20 at 16:21
  • There is a tutorial here: https://www.cyberciti.biz/tips/howto-recovering-grub-boot-loader-password.html which suggests booting from a liveCD, and then editing the grub config from there – Tom Oct 14 '20 at 16:24

1 Answers1

0

From the screenshot of the username prompt, it looks like password protection has been enabled for your grub menu: https://help.ubuntu.com/community/Grub2/Passwords

This password protection is set in the grub configuration file. Given you don't have login access to the machine, a work-around for that is to boot off a liveCD, and modify the grub config from there.

Really, any recent linux iso would do, and mount as cd in Vmware

There is a tutorial on doing that here: https://www.computernetworkingnotes.com/rhce-study-guide/how-to-reset-grub-password-in-linux.html

and here: https://www.cyberciti.biz/tips/howto-recovering-grub-boot-loader-password.html

you are basically looking for a line like so, and removing it:

password --md5 $1$9sdflksdf/sdf44k
Tom
  • 11,176
  • 5
  • 41
  • 63