
<def-group>
  <definition class="compliance" id="accounts_password_pam_enforcing" version="1">
    <metadata>
        <title>Ensure PAM Enforces Password Requirements - Enforcing</title>
        
    <affected family="unix">
    <platform>Ubuntu 22.04</platform>
    </affected>
        <description>Check presence of enforcing = 1 in /etc/security/pwquality.conf</description>
    </metadata>
    <criteria operator="AND" comment="Test conditions - presence of the file plus 0 extra definitions.">
      <criterion comment="Check that /etc/security/pwquality.conf contains a line with certain text" test_ref="test_accounts_password_pam_enforcing" />
    </criteria>
  </definition>

  <ind:textfilecontent54_test check="all"
  comment="tests the presence of 'enforcing = 1' setting in the /etc/security/pwquality.conf file"
  id="test_accounts_password_pam_enforcing" version="1">
  <ind:object object_ref="obj_accounts_password_pam_enforcing" />
  </ind:textfilecontent54_test>

  <ind:textfilecontent54_object id="obj_accounts_password_pam_enforcing" version="1">
    <ind:filepath>/etc/security/pwquality.conf</ind:filepath>
    <ind:pattern operation="pattern match">^[\s]*enforcing = 1[\s]*$</ind:pattern>
    <ind:instance operation="greater than or equal" datatype="int">1</ind:instance>
  </ind:textfilecontent54_object>
</def-group>