/usr/share/openscap/sectool-sce/08_pam.sh is in libopenscap8 1.2.15-1build1.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | #!/bin/bash
# Copyright (C) 2008 Red Hat, Inc.
# Written by Tomas Heinrich <theinric@redhat.com>
# Adapted for SCE by Martin Preisler <mpreisle@redhat.com>
SYSTEM_AUTH_CFG="/etc/pam.d/system-auth"
PARANOID=0
if [[ ! -f ${SYSTEM_AUTH_CFG} ]]; then
echo "Configuration file \"${SYSTEM_AUTH_CFG}\" doesn't exist."
exit $XCCDF_RESULT_FAIL
fi
RET=$XCCDF_RESULT_PASS
sed -n -e ':a; /\\$/N; s/\\\n//; ta; s/^[ \t]*password[^#]*pam_cracklib.so.*//; T; q 1' ${SYSTEM_AUTH_CFG}
if [[ "$?" -eq "0" ]]; then
echo "New passwords for system services aren't checked with cracklib."
echo "Add a call to pam_cracklib to '${SYSTEM_AUTH_CFG}'. Please see 'man pam_cracklib' for details."
RET=$XCCDF_RESULT_INFORMATIONAL
fi
if (( ${PARANOID} == 1 )); then
sed -n -e ':a; /\\$/N; s/\\\n//; ta; s/^[ \t]*auth[^#]*pam_tally\.so.*//p; T; q 1' ${SYSTEM_AUTH_CFG}
if [[ "$?" -eq "0" ]]; then
echo "Account lockout after repetitive failed login attempts is not configured."
echo "Add a call to pam_tally to '${SYSTEM_AUTH_CFG}'. Please see 'man pam_tally' for details."
RET=$XCCDF_RESULT_INFORMATIONAL
fi
fi
exit $RET
|