-
Notifications
You must be signed in to change notification settings - Fork 765
fixes to grub2 admin user and password rules #13467
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fixes to grub2 admin user and password rules #13467
Conversation
…-mkconfig The macro currently puts there grubby, which is fine in most cases, but not in this one. Grubby is good when updating kernel parameters.
…t export the variable
|
This datastream diff is auto generated by the check Click here to see the full diffNew content has different text for rule 'xccdf_org.ssgproject.content_rule_grub2_admin_username'.
--- xccdf_org.ssgproject.content_rule_grub2_admin_username
+++ xccdf_org.ssgproject.content_rule_grub2_admin_username
@@ -17,12 +17,15 @@
Change the superuser to a different username (The default is 'root').
$ sed -i 's/\(set superusers=\).*/\1"<unique user ID>"/g' /etc/grub.d/01_users
-
+The line mentioned above must be followed by the line
+export superusers
+so that the superusers is honored.
+
Once the superuser account has been added,
update the
grub.cfg file by running:
-grubby --update-kernel=ALL --env=/boot/grub2/grubenv
+grub-mkconfig -o /boot/grub2/grub.cfg
[warning]:
To prevent hard-coded admin usernames, automatic remediation of this control is not available. Remediation
New content has different text for rule 'xccdf_org.ssgproject.content_rule_grub2_uefi_admin_username'.
--- xccdf_org.ssgproject.content_rule_grub2_uefi_admin_username
+++ xccdf_org.ssgproject.content_rule_grub2_uefi_admin_username
@@ -17,12 +17,15 @@
Change the superuser to a different username (The default is 'root').
$ sed -i 's/\(set superusers=\).*/\1"<unique user ID>"/g' /etc/grub.d/01_users
-
+The line mentioned above must be followed by the line
+export superusers
+so that the superusers is honored.
+
Once the superuser account has been added,
update the
grub.cfg file by running:
-grubby --update-kernel=ALL --env=/boot/grub2/grubenv
+grub-mkconfig -o /boot/grub2/grub.cfg
[warning]:
To prevent hard-coded admin usernames, automatic remediation of this control is not available. Remediation |
|
Code Climate has analyzed commit bbb38aa and detected 0 issues on this pull request. The test coverage on the diff in this pull request is 100.0% (50% is the threshold). This pull request will bring the total coverage in the repository to 61.9% (0.0% change). View more on Code Climate. |
jan-cerny
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have run test scenarios on RHEL 8 and RHEL 9 and they passed.
Description:
Rationale:
These fixes are based on findings in https://issues.redhat.com/browse/RHEL-58818
Review Hints: