4.4.5 Ensure all current passwords uses the configured hashing algorithm

Information

Currently used passwords with out of date hashing algorithms may pose a security risk to the system.

In use passwords should always match the configured hashing algorithm for the system.

Solution

If the administrator wish to force an immediate change on all users as per the output of the audit, execute:

#!/usr/bin/env bash

{
UID_MIN=$(awk '/^s*UID_MIN/{print $2}' /etc/login.defs)
awk -F: -v UID_MIN="${UID_MIN}" '( $3 >= UID_MIN && $1 != "nfsnobody" ) { print $1 }' /etc/passwd | xargs -n 1 chage -d 0
}

NOTE: This could cause significant temporary CPU load on the system if a large number of users reset their passwords at the same time.

Impact:

If the administrator forces a password change, this could cause a large spike in CPU usage if a large number of users change their password during the same time.

See Also

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

Item Details

Category: IDENTIFICATION AND AUTHENTICATION, SYSTEM AND COMMUNICATIONS PROTECTION

References: 800-53|IA-5(1), 800-53|SC-28, 800-53|SC-28(1), CSCv7|16.4

Plugin: Unix

Control ID: 8aea1c66600dc713cf0d70b169fdef1890cb116bc5a076edff987bd595de9c68