
   


<def-group>
  <definition class="compliance" id="accounts_passwords_pam_tally2_file" version="3">
    <metadata>
        <title>SLEM 5 must use the default pam_tally2 tally directory.</title>
        
    <affected family="unix">
    <platform>Ubuntu 22.04</platform>
    </affected>
        <description>Configure PAM module</description>
    </metadata>
    <criteria operator="AND" comment="Make sure arguments are properly configured">


      <criterion test_ref="test_pam_auth_pam_tally2_file" comment="Verify file is set to the desired state" />


    </criteria>
  </definition>



  <ind:textfilecontent54_test id="test_pam_auth_pam_tally2_file"
  check="all" check_existence="none_exist"
  comment="Verify file configuation of pam_tally2.so" version="1">
    <ind:object object_ref="object_pam_auth_pam_tally2_file" />
  </ind:textfilecontent54_test>

  <ind:textfilecontent54_object id="object_pam_auth_pam_tally2_file" comment="Check file configuration of PAM pam_tally2.so module" version="1">
    <ind:filepath>/etc/pam.d/login</ind:filepath>

    <ind:pattern operation="pattern match">^\s*auth(?:(?!\n)\s)+required(?:(?!\n)\s)+pam_tally2.so((?!\n)\s[^\n]+)?(?!\n)\s+file=.*((\s+\S+)*\s*\\*\s*)$</ind:pattern>

    <ind:instance datatype="int">1</ind:instance>
  </ind:textfilecontent54_object>


</def-group>