Reset root password on RHEL7
Published: 21 March 2018
Note: this article is old and may contain outdated or incorrect information.
How to reset an unknown root password using rd.break on RHEL 7.
Start by booting until the GRUB2 menu appears then edit the boot loader menu with the e key. Find the line beginning with linux and make then follow these steps.
- add rd.break
- run mount -o remount,rw /sysroot
- run chroot /sysroot
- run passwd
- run touch /.autorelabel
- exit chroot
- run mount -o remount,ro /sysroot
- exit resuce mode
Login with the password set in step 4 after rebooting.