5.3.3.2.7 Ensure password quality checking is enforced

Information

The pam_pwquality module can be configured to either reject a password if it fails the checks, or only print a warning.

This is configured by setting the enforcing=<N> argument. If nonzero, a password will be rejected if it fails the checks, otherwise only a warning message will be provided.

This setting applies only to the pam_pwquality module and possibly other applications that explicitly change their behavior based on it. It does not affect pwmake(1) and pwscore(1).

Strong passwords help protect systems from password attacks. Types of password attacks include dictionary attacks, which attempt to use common words and phrases, and brute force attacks, which try every possible combination of characters. Also attackers may try to obtain the account database so they can use tools to discover the accounts and passwords.

Solution

Run the following command:

# grep -Pl -- 'bpam_pwquality.soh+([^#
r]+h+)?enforcing=0b' /usr/share/pam-configs/*

Edit any returned files and remove the enforcing=0 argument from the pam_pwquality.so line(s)

Edit /etc/security/pwquality.conf and all files ending inconf in the /etc/security/pwquality.conf.d/ directory and remove or comment out any line containing the enforcing = 0 argument:

Example:

# sed -ri 's/^s*enforcings*=s*0/# &amp;/' /etc/security/pwquality.conf /etc/security/pwquality.conf.d/*.conf

See Also

https://workbench.cisecurity.org/benchmarks/17074

Item Details

Category: IDENTIFICATION AND AUTHENTICATION

References: 800-53|IA-5(1), CSCv7|4.4

Plugin: Unix

Control ID: e6c867a26103c0a580cdce990710df9fce8ff12f65cf553f8cdcb2a026347a16