Bug 2092392

Summary: Unable to reset password using rd.break in PRIMARY kernel if root password is defined by anaconda during install (works if defined post-install in user-space).
Product: Red Hat Enterprise Linux 9 Reporter: Will Russell <wrussell>
Component: dracutAssignee: dracut-maint-list
Status: CLOSED DUPLICATE QA Contact: qe-baseos-daemons
Severity: high Docs Contact:
Priority: unspecified    
Version: 9.0CC: jstodola
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-02-14 16:19:03 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:

Description Will Russell 2022-06-01 12:30:22 UTC
Description of problem:
in RHEL9, if you define the password for root using the anaconda installer, you will be unable to use rd.break in primary kernel with grub boot modification to enter a maintenance shell - it will prompt you for password when booting to emergency.target (if you have forgotten root password, this is problematic).

HOWEVER. If you do NOT define the password for root during install, and instead allow boot to reach the user environment, login for the first time, ascend to root, and assign a root password, on subsequent reboots, you can now rd.break as expected to the maintenance environment directly without needing to insert root password.

Version-Release number of selected component (if applicable):


How reproducible:
every time - reproduced across multiple installs, issues persist across reboots if root pass is defined at install. (have not tested whether or not you can FIX this behavior by purging root password afterwards, only that this behavior is discrepant, compared to booting up without a root password and defining it afterwards).

Steps to Reproduce:
1. Install RHEL 9 in VM or target workstation installation (note that selection of user environment makes no difference - server with gui, server, workstation all have same issue
2. Enable root password at installation time via anaconda, define a password
3. boot to user environment, login as defined user account or root, reboot
4. append rd.break to PRIMARY active kernel (default selection at grub) using 'e' and observe that boot to maintenance is now blocked with a requirement to insert root password or press ctrl+D to continue/exit shell. (Unable to bypass).

steps to observe different behavior:
1. install rhel 9, but this time omit root password during installation
2. login as user account, ascend to root and assign a root password
3. restart your workstation
4. at grub, append rd.break to linux line in PRIMARY active kernel using 'e' and observe that maintenance shell now boots successfully and allows immediate access to the shell for /sysroot modification and root password reset (as expected).

**it is important to note that using the RECOVERY kernel available works every time for this feature, and is not impacted by anaconda installation parameters.

Actual results:
unable to reset root password if defined at install time.

Expected results:
rd.break should work as expected/aligned with documentation that advise this works.

Additional info:
see also: 2057365

Comment 2 Jan Stodola 2023-02-14 16:19:03 UTC
This is fixed since RHEL-9.1. I'm closing this bug as a duplicate of bug 2057365.

*** This bug has been marked as a duplicate of bug 2057365 ***