Skip to content

Set Password Minimum Length

An XCCDF Rule

Description

The pam_cracklib module's minlen parameter controls requirements for minimum characters required in a password. Add minlen= to set minimum password length requirements.

Rationale

Password length is one factor of several that helps to determine strength and how long it takes to crack a password. Use of more characters in a password helps to exponentially increase the time and/or resources required to compromise the password.

ID
xccdf_org.ssgproject.content_rule_cracklib_accounts_password_pam_minlen
Severity
Medium
References
Updated



Remediation - Ansible

- name: XCCDF Value var_password_pam_minlen # promote to variable
  set_fact:
    var_password_pam_minlen: !!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_minlen" use="legacy"/>
  tags:
    - always


Remediation - Shell Script


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