Skip to content

Set Password Retry Limit

An XCCDF Rule

Description

The pam_cracklib module's retry parameter controls the maximum number of times to prompt the user for the password before returning with error. Make sure it is configured with a value that is no more than . For example, retry=1.

Rationale

To reduce opportunities for successful guesses and brute-force attacks.

ID
xccdf_org.ssgproject.content_rule_cracklib_accounts_password_pam_retry
Severity
Medium
References
Updated



Remediation - Ansible

- name: XCCDF Value var_password_pam_retry # promote to variable
  set_fact:
    var_password_pam_retry: !!str <xccdf-1.2:sub xmlns:xccdf-1.2="http://checklists.nist.gov/xccdf/1.2" idref="xccdf_org.ssgproject.content_value_var_password_pam_retry" use="legacy"/>
  tags:
    - always


Remediation - Shell Script


declare -a VALUES=()
declare -a VALUE_NAMES=()
declare -a ARGS=()
declare -a NEW_ARGS=()