Skip to content

Set Password Strength Minimum Special Characters

An XCCDF Rule

Description

The pam_cracklib module's ocredit= parameter controls requirements for usage of special (or ``other'') characters in a password. When set to a negative number, any password will be required to contain that many special characters. When set to a positive number, pam_cracklib will grant +1 additional length credit for each special character. Make sure the ocredit parameter for the pam_cracklib module is set to less than or equal to . For example, ocredit=.

Rationale

Requiring a minimum number of special characters makes password guessing attacks more difficult by ensuring a larger search space.

ID
xccdf_org.ssgproject.content_rule_cracklib_accounts_password_pam_ocredit
Severity
Medium
References
Updated



Remediation - Ansible

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


Remediation - Shell Script


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