RHEL Recover root Password: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
|||
| (One intermediate revision by the same user not shown) | |||
| Line 15: | Line 15: | ||
#: <tt>'''# passwd'''</tt> | #: <tt>'''# passwd'''</tt> | ||
# Update the SELinux Security Context. | # Update the SELinux Security Context. | ||
#: <tt>'''touch /.autorelabel'''</tt> | #: <tt>'''# touch /.autorelabel'''</tt> | ||
# Exit the <tt>'''/sysroot'''</tt> chroot. | # Exit the <tt>'''/sysroot'''</tt> chroot. | ||
#: <tt>'''# exit'''</tt> | #: <tt>'''# exit'''</tt> | ||
Latest revision as of 19:14, 2 April 2026
Red Hat Enterprise Linux
- Reboot OS into emergency mode.
- During the GRUB2 countdown, Edit the first line by pressing "e".
- Locate the line that reads "linux".
- Immediately following the "quiet" keyword append "rd.break"
- Locate the line that reads "linux".
- Continue the boot process.
- Press Ctrl-x to boot.
- The system will boot into emergency mode and the switch_root prompt will appear.
- Remount the /sysroot filesystem as rw.
- # mount -o remount,rw /sysroot
- chroot to the /sysroot filesystem.
- # chroot /sysroot
- Create a new password.
- # passwd
- Update the SELinux Security Context.
- # touch /.autorelabel
- Exit the /sysroot chroot.
- # exit
- Exit emergency mode.
- # exit