{"description": "The Ubuntu 22.04 operating system must lock an account after - at most - <sub idref=\"var_password_pam_tally2\" />\nconsecutive invalid access attempts.", "rationale": "By limiting the number of failed logon attempts, the risk of unauthorized\nsystem access via user password guessing, otherwise known as brute-force\nattacks, is reduced. Limits are imposed by locking the account.\n\nTo configure the operating system to lock an account after three\nunsuccessful consecutive access attempts using <tt>pam_tally2.so</tt>,\nmodify the content of both <tt>/etc/pam.d/common-auth</tt> and\n<tt>/etc/pam.d/common-account</tt> as follows:\n<br /><br />\n<ul>\n<li> add or modify the <tt>pam_tally2.so</tt> module line in\n<tt>/etc/pam.d/common-auth</tt> to ensure both <tt>onerr=fail</tt> and\n<tt>deny=<sub idref=\"var_password_pam_tally2\" /></tt> are present. For example:\n<pre>auth required pam_tally2.so onerr=fail silent audit deny=<sub idref=\"var_password_pam_tally2\" /></pre></li>\n<li> add or modify the following line in <tt>/etc/pam.d/common-account</tt>:\n<pre>account required pam_tally2.so</pre></li>\n</ul>", "severity": "medium", "references": {"pcidss": ["Req-8.1.6"], "srg": ["SRG-OS-000021-GPOS-00005"], "anssi": ["R31"], "pcidss4": ["8.3.4", "8.3"]}, "control_references": {"anssi": ["R31"], "pcidss4": ["8.3.4", "8.3"]}, "components": [], "identifiers": {}, "ocil_clause": "the account option is missing or commented out", "ocil": "Check that the systems locks a user account after - at most - <tt><sub idref=\"var_password_pam_tally2\" /></tt>\nconsecutive failed login attempts with the following command:\n\n<pre># grep pam_tally2.so /etc/pam.d/common-auth\nauth required pam_tally2.so onerr=fail deny=<sub idref=\"var_password_pam_tally2\" /></pre>\n\nIf no line is returned, the line is commented out, or the line is missing\n\"onerr=fail\", this is a finding.\nIf the line has \"deny\" set to a value outside of the range <pre>1-<sub idref=\"var_password_pam_tally2\" /></pre>,\nthis is a finding.\n\nCheck that the system resets the failed login attempts counter after a\nsuccessful login using the following command:\n\n<pre># grep pam_tally2.so /etc/pam.d/common-account\naccount required pam_tally2.so deny=<sub idref=\"var_password_pam_tally2\" /></pre>\n\nIf the account option is missing, or commented out, this is a finding.", "oval_external_content": null, "fixtext": "", "checktext": "", "vuldiscussion": "", "srg_requirement": "", "warnings": [], "conflicts": [], "requires": [], "policy_specific_content": {}, "platform": "package[pam]", "platforms": ["package[pam]"], "sce_metadata": {}, "inherited_platforms": ["system_with_kernel"], "cpe_platform_names": ["package_pam"], "inherited_cpe_platform_names": ["system_with_kernel"], "bash_conditional": null, "fixes": {}, "title": "Set Deny For Failed Password Attempts", "definition_location": "/aptdata/openscap/scap-security-guide/linux_os/guide/system/accounts/accounts-pam/locking_out_password_attempts/accounts_passwords_pam_tally2/rule.yml", "template": null}