Skip to content

SLE16 related fixes to accounts password template#14717

Merged
jan-cerny merged 3 commits into
ComplianceAsCode:masterfrom
teacup-on-rockingchair:sle16_accounts_password_template
May 18, 2026
Merged

SLE16 related fixes to accounts password template#14717
jan-cerny merged 3 commits into
ComplianceAsCode:masterfrom
teacup-on-rockingchair:sle16_accounts_password_template

Conversation

@teacup-on-rockingchair
Copy link
Copy Markdown
Contributor

Description:

  • Distro defaults from /usr/lib/security/pwquality.conf is used only as bootstrap for pwquality configuration to be hardened. Cannot rely on anything in /usr/etc to remain same after distro or package upgrade so hardening should be based only on configuration in /etc

Rationale:

  • bash/ansible remediations now copy distro defaults from /usr/lib/security/pwquality.conf to /etc/security/pwquality.conf. This affects rules accounts_password_pam_dcredit, accounts_password_pam_lcredit, accounts_password_pam_minlen and non-template using rule like accounts_password_pam_retry should have same behaviour

@openshift-ci openshift-ci Bot added the do-not-merge/work-in-progress Used by openshift-ci bot. label May 17, 2026
@openshift-ci
Copy link
Copy Markdown

openshift-ci Bot commented May 17, 2026

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@github-actions
Copy link
Copy Markdown

This datastream diff is auto generated by the check Compare DS/Generate Diff

Click here to see the full diff
bash remediation for rule 'xccdf_org.ssgproject.content_rule_accounts_password_pam_dcredit' differs.
--- xccdf_org.ssgproject.content_rule_accounts_password_pam_dcredit
+++ xccdf_org.ssgproject.content_rule_accounts_password_pam_dcredit
@@ -8,6 +8,8 @@
 if grep -sq dcredit /etc/security/pwquality.conf.d/*.conf ; then
     sed -i "/dcredit/d" /etc/security/pwquality.conf.d/*.conf
 fi
+
+
 
 
 

bash remediation for rule 'xccdf_org.ssgproject.content_rule_accounts_password_pam_dictcheck' differs.
--- xccdf_org.ssgproject.content_rule_accounts_password_pam_dictcheck
+++ xccdf_org.ssgproject.content_rule_accounts_password_pam_dictcheck
@@ -8,6 +8,8 @@
 if grep -sq dictcheck /etc/security/pwquality.conf.d/*.conf ; then
     sed -i "/dictcheck/d" /etc/security/pwquality.conf.d/*.conf
 fi
+
+
 
 
 

bash remediation for rule 'xccdf_org.ssgproject.content_rule_accounts_password_pam_difok' differs.
--- xccdf_org.ssgproject.content_rule_accounts_password_pam_difok
+++ xccdf_org.ssgproject.content_rule_accounts_password_pam_difok
@@ -8,6 +8,8 @@
 if grep -sq difok /etc/security/pwquality.conf.d/*.conf ; then
     sed -i "/difok/d" /etc/security/pwquality.conf.d/*.conf
 fi
+
+
 
 
 

bash remediation for rule 'xccdf_org.ssgproject.content_rule_accounts_password_pam_lcredit' differs.
--- xccdf_org.ssgproject.content_rule_accounts_password_pam_lcredit
+++ xccdf_org.ssgproject.content_rule_accounts_password_pam_lcredit
@@ -8,6 +8,8 @@
 if grep -sq lcredit /etc/security/pwquality.conf.d/*.conf ; then
     sed -i "/lcredit/d" /etc/security/pwquality.conf.d/*.conf
 fi
+
+
 
 
 

bash remediation for rule 'xccdf_org.ssgproject.content_rule_accounts_password_pam_maxclassrepeat' differs.
--- xccdf_org.ssgproject.content_rule_accounts_password_pam_maxclassrepeat
+++ xccdf_org.ssgproject.content_rule_accounts_password_pam_maxclassrepeat
@@ -8,6 +8,8 @@
 if grep -sq maxclassrepeat /etc/security/pwquality.conf.d/*.conf ; then
     sed -i "/maxclassrepeat/d" /etc/security/pwquality.conf.d/*.conf
 fi
+
+
 
 
 

bash remediation for rule 'xccdf_org.ssgproject.content_rule_accounts_password_pam_maxrepeat' differs.
--- xccdf_org.ssgproject.content_rule_accounts_password_pam_maxrepeat
+++ xccdf_org.ssgproject.content_rule_accounts_password_pam_maxrepeat
@@ -8,6 +8,8 @@
 if grep -sq maxrepeat /etc/security/pwquality.conf.d/*.conf ; then
     sed -i "/maxrepeat/d" /etc/security/pwquality.conf.d/*.conf
 fi
+
+
 
 
 

bash remediation for rule 'xccdf_org.ssgproject.content_rule_accounts_password_pam_maxsequence' differs.
--- xccdf_org.ssgproject.content_rule_accounts_password_pam_maxsequence
+++ xccdf_org.ssgproject.content_rule_accounts_password_pam_maxsequence
@@ -8,6 +8,8 @@
 if grep -sq maxsequence /etc/security/pwquality.conf.d/*.conf ; then
     sed -i "/maxsequence/d" /etc/security/pwquality.conf.d/*.conf
 fi
+
+
 
 
 

bash remediation for rule 'xccdf_org.ssgproject.content_rule_accounts_password_pam_minclass' differs.
--- xccdf_org.ssgproject.content_rule_accounts_password_pam_minclass
+++ xccdf_org.ssgproject.content_rule_accounts_password_pam_minclass
@@ -8,6 +8,8 @@
 if grep -sq minclass /etc/security/pwquality.conf.d/*.conf ; then
     sed -i "/minclass/d" /etc/security/pwquality.conf.d/*.conf
 fi
+
+
 
 
 

bash remediation for rule 'xccdf_org.ssgproject.content_rule_accounts_password_pam_minlen' differs.
--- xccdf_org.ssgproject.content_rule_accounts_password_pam_minlen
+++ xccdf_org.ssgproject.content_rule_accounts_password_pam_minlen
@@ -8,6 +8,8 @@
 if grep -sq minlen /etc/security/pwquality.conf.d/*.conf ; then
     sed -i "/minlen/d" /etc/security/pwquality.conf.d/*.conf
 fi
+
+
 
 
 

bash remediation for rule 'xccdf_org.ssgproject.content_rule_accounts_password_pam_ocredit' differs.
--- xccdf_org.ssgproject.content_rule_accounts_password_pam_ocredit
+++ xccdf_org.ssgproject.content_rule_accounts_password_pam_ocredit
@@ -8,6 +8,8 @@
 if grep -sq ocredit /etc/security/pwquality.conf.d/*.conf ; then
     sed -i "/ocredit/d" /etc/security/pwquality.conf.d/*.conf
 fi
+
+
 
 
 

bash remediation for rule 'xccdf_org.ssgproject.content_rule_accounts_password_pam_retry' differs.
--- xccdf_org.ssgproject.content_rule_accounts_password_pam_retry
+++ xccdf_org.ssgproject.content_rule_accounts_password_pam_retry
@@ -2,6 +2,8 @@
 if rpm --quiet -q kernel-core && { rpm --quiet -q libpwquality; }; then
 
 var_password_pam_retry=''
+
+
 
 
 # Strip any search characters in the key arg so that the key can be replaced without

bash remediation for rule 'xccdf_org.ssgproject.content_rule_accounts_password_pam_ucredit' differs.
--- xccdf_org.ssgproject.content_rule_accounts_password_pam_ucredit
+++ xccdf_org.ssgproject.content_rule_accounts_password_pam_ucredit
@@ -8,6 +8,8 @@
 if grep -sq ucredit /etc/security/pwquality.conf.d/*.conf ; then
     sed -i "/ucredit/d" /etc/security/pwquality.conf.d/*.conf
 fi
+
+
 
 
 

@teacup-on-rockingchair teacup-on-rockingchair added this to the 0.1.81 milestone May 17, 2026
@teacup-on-rockingchair teacup-on-rockingchair added SLES SUSE Linux Enterprise Server product related. Update Template Issues or pull requests related to Templates updates. Ansible Ansible remediation update. Bash Bash remediation update. labels May 17, 2026
@teacup-on-rockingchair teacup-on-rockingchair marked this pull request as ready for review May 17, 2026 13:18
@openshift-ci openshift-ci Bot removed the do-not-merge/work-in-progress Used by openshift-ci bot. label May 17, 2026
@openshift-ci
Copy link
Copy Markdown

openshift-ci Bot commented May 17, 2026

@teacup-on-rockingchair: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/4.18-images 0a01e3d link true /test 4.18-images
ci/prow/e2e-aws-openshift-node-compliance 0a01e3d link true /test e2e-aws-openshift-node-compliance
ci/prow/e2e-aws-openshift-platform-compliance 0a01e3d link true /test e2e-aws-openshift-platform-compliance

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

@jan-cerny jan-cerny self-assigned this May 18, 2026
Copy link
Copy Markdown
Collaborator

@jan-cerny jan-cerny left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have reviewed the code and succesfully run automatus tests locally. The fail is rule rsyslog_files_permissions isn't caused by the contents of this PR and is currently being solved in #14715.

@jan-cerny jan-cerny merged commit 5577557 into ComplianceAsCode:master May 18, 2026
62 of 69 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Ansible Ansible remediation update. Bash Bash remediation update. SLES SUSE Linux Enterprise Server product related. Update Template Issues or pull requests related to Templates updates.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants