Bug 2057365
Summary: | Unable to reset root password using rd.break | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 9 | Reporter: | Ravindra Patil <ravpatil> |
Component: | dracut | Assignee: | Pavel Valena <pvalena> |
Status: | CLOSED ERRATA | QA Contact: | Frantisek Sumsal <fsumsal> |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 9.0 | CC: | ddf-bot, dracut-maint-list, dsaha, dsilver, dtardon, fsumsal, jstodola, lukasz.filipek, mpershin, msekleta, pvalena, rmetrich, sgandhi, sjanderk, vbhope, wrussell |
Target Milestone: | rc | Keywords: | Documentation, Triaged |
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | dracut-057-10.git20220721.el9 | Doc Type: | If docs needed, set a value |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2022-11-15 11:22:12 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: | |||
Bug Depends On: | |||
Bug Blocks: | 2010412, 2092132 |
Description
Ravindra Patil
2022-02-23 09:57:51 UTC
Reassigning to dracut for review, this is a post-installation task. dracut uses sulogin to enter the emergency shell since https://github.com/dracutdevs/dracut/commit/32f68c1f9ac3720e8ce4b95a09c0ce680d5da786 , so this hack no longer works. As an alternative, boot from a live CD/USB and mount the root partition from there. Ravindra, it seems that the product documentation you referenced for RHEL 9.0 Beta ( https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/9-beta/html/configuring_basic_system_settings/changing-and-resetting-the-root-password-from-the-command-line_configuring-basic-system-settings ) on Chapter 23.3. "Resetting the root password on boot” is based on RHEL 8 and no longer aplicable for RHEL 9 beta. Entering into a chroot environment in order to reset the root password for RHEL 9 beta can now be done under the rescue boot parameters. In addition, the current documentation for RHEL 9 beta -Chapter 23.3 - Procedure #4 : The procedure states that "The switch_root prompt appears". This is also no longer applicable. After entering rescue mode and pressing the Enter key for maintenance, the sh-5.1# prompt now appears immediately. After this step, all following steps on current documentation can now be done successfully. New Steps: 1. Reboot the system and, on the GRUB 2 boot screen, use the down arrow key on your keyboard to select rescue mode. Press the e key to interrupt the boot process. Red Hat Enterprise Linux (0-rescure-XXXXXXXXXXXXXXXXXXXXXXXXXX) 9.0 2. Go to the end of the line that starts with linux. 3. Add rd.break to the end of the line that starts with linux. 4. Press Ctrl+x to start the system with the changed parameters. 5. Press the Enter key to enter maintenance mode. The sh-5.1# prompt appears. 6. Remount the file system as writable: mount -o remount,rw /sysroot 7. Enter the chroot environment: chroot /sysroot 8. Reset the root password: passwd 9. Enable the SELinux relabeling process on the next system boot: touch /.autorelabel 10. Exit the chroot environment: exit 11. Exit maintenance mode: exit —----------------------------------------- I hope this is beneficial. Thank you @David Silver!!!! The documentation for rhel 9 is still incorrect and needs to be updated. The documentation at step 23.3 step 1 needs to specify that the rescue kernel option needs to be selected with grub2. https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/9/html/configuring_basic_system_settings/changing-and-resetting-the-root-password-from-the-command-line_configuring-basic-system-settings *** Bug 2092132 has been marked as a duplicate of this bug. *** *** Bug 2092150 has been marked as a duplicate of this bug. *** Let's revert this behaviour to rhel8 one. (no password) *** Bug 2056192 has been marked as a duplicate of this bug. *** I have a quicker way to reset root password in RHEL9. 0. ctrl + e 1. In linux line change ro to rw and add init=/bin/bash at the end of the line. 2. ctrl +x 3. passwd 4. touch ./autorelabel 5. exec /sbin/init (In reply to Łukasz Filipek from comment #15) > I have a quicker way to reset root password in RHEL9. > > 0. ctrl + e > 1. In linux line change ro to rw and add init=/bin/bash at the end of the > line. > 2. ctrl +x > 3. passwd > 4. touch ./autorelabel > 5. exec /sbin/init 4. touch /.autorelabel *** Bug 2106996 has been marked as a duplicate of this bug. *** @Łukasz, True that step is working but need to add the following step as well. 0. ctrl + e 1. In linux line change ro to rw and add init=/bin/bash at the end of the line. 2. ctrl +x ===> mount -o remount,rw / ==> As without it, it is throwing an "authentication token manipulation error" 3. passwd 4. touch ./autorelabel 5. exec /sbin/init Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (dracut bug fix and enhancement update), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2022:8379 *** Bug 2142820 has been marked as a duplicate of this bug. *** *** Bug 2092392 has been marked as a duplicate of this bug. *** |