Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 2021093

Summary: The Description text of grub2_uefi_password talks about grub2-mkconfig
Product: Red Hat Enterprise Linux 9 Reporter: Jan Pazdziora (Red Hat) <jpazdziora>
Component: scap-security-guideAssignee: Watson Yuuma Sato <wsato>
Status: CLOSED ERRATA QA Contact: Milan Lysonek <mlysonek>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 9.0CC: ggasparb, matyc, mhaicman, mlysonek, vpolasek
Target Milestone: rcKeywords: AutoVerified, Triaged
Target Release: ---Flags: pm-rhel: mirror+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: scap-security-guide-0.1.60-1.el9 Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-05-17 13:53:40 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 Jan Pazdziora (Red Hat) 2021-11-08 11:02:18 UTC
Description of problem:

The Description text of the xccdf_org.ssgproject.content_rule_grub2_uefi_password rule says

  Once the superuser password has been added, update the grub.cfg file by running:

    grub2-mkconfig -o /boot/grub2/grub.cfg

However, that does not seem to be needed at all, at least per https://access.redhat.com/solutions/4575381 and per testing the behaviour on both RHEL 8 and RHEL 9 where the password_pbkdf2 root ${GRUB2_PASSWORD} is there always, just wrapped in

if [ -f ${prefix}/user.cfg ]; then
  source ${prefix}/user.cfg
  if [ -n "${GRUB2_PASSWORD}" ]; then
    set superusers="root"
    export superusers
    password_pbkdf2 root ${GRUB2_PASSWORD}
  fi
fi

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

scap-security-guide-0.1.57-5.el9.noarch

How reproducible:

Deterministic.

Steps to Reproduce:
1. On machine where GRUB password is not set, run
   oscap xccdf eval --remediate --profile xccdf_org.ssgproject.content_profile_ospp --rule xccdf_org.ssgproject.content_rule_grub2_uefi_password --report report.html /usr/share/xml/scap/ssg/content/ssg-rhel9-ds.xml
2. As the rule couldn't remediate (since that would require prompting for a password), read the report.html to see how to fix the issue.

Actual results:

The Description suggests grub2-setpassword and grub2-mkconfig -o /boot/grub2/grub.cfg.

However, already after grub2-setpassword the oscap xccdf eval passes.

Expected results:

The Description only recommends grub2-setpassword (or grub2-set-password which was used to check on bug 1987231?).

Additional info:

Also, the dollar sign in

  $ grub2-setpassword

suggests that this command could be run as non-root but that leads to

  The grub bootloader password may only be set by root.

So it should be # grub2-setpassword.

Comment 2 Vojtech Polasek 2021-11-19 14:58:11 UTC
Fixed upstream: https://github.com/ComplianceAsCode/content/pull/7859

Comment 3 Milan Lysonek 2022-01-07 13:47:18 UTC
Dollar sign in grub2-setpassword command has been changed to # - https://github.com/ComplianceAsCode/content/pull/8036

Comment 16 errata-xmlrpc 2022-05-17 13:53:40 UTC
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 (new packages: scap-security-guide), 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:2610