The reconstructed evaluation script behind this rule's OVAL check(s) — every module a compound check combines, with this rule's own concrete values and DISA's SCC tool's real per-module mechanism curated from static teardown of SCC releases.
#!/bin/bash
# Reconstructed from oval:mil.disa.stig.rhel9os:def:258133
# RHEL 9 must prohibit the use of cached authenticators after one day.
# Per-module read mechanism curated from static teardown of DISA's SCC tool
# (SCAP Compliance Checker) -- see the SCC Automation Reference above.
# /etc/sssd/sssd.conf:cache_credentials = true does not exist
# textfilecontent54_object (textfilecontent54_test)
test_1() {
( ! ( grep -Pq '^\s*cache_credentials\s*=\s*true\b$' '/etc/sssd/sssd.conf' &>/dev/null ) ) || ( ! ( grep -rqP --include='*.conf' '^\s*cache_credentials\s*=\s*true\b$' '/etc/sssd/conf.d' &>/dev/null ) )
}
# /etc/sssd/sssd.conf:offline_credentials_expiration = 1
# textfilecontent54_object (textfilecontent54_test)
test_2() {
( [ "$(sed -En 's/^\s*offline_credentials_expiration\s*=\s*(\d*)\s*(?:#.*)?$/\1/p' '/etc/sssd/sssd.conf')" -eq 1 ] ) || ( [ "$(grep -rhP --include='*.conf' '^\s*offline_credentials_expiration\s*=\s*(\d*)\s*(?:#.*)?$' '/etc/sssd/conf.d' | sed -En 's/^\s*offline_credentials_expiration\s*=\s*(\d*)\s*(?:#.*)?$/\1/p')" -eq 1 ] )
}
if ( test_1 || test_2 ); then
echo "PASS"
else
echo "FAIL"
fi Assessment Script Powered by AISandbox-executed
A standalone Shell script to assess this control automatically. Review before running it in your environment.
Syntax-checked and actually executed in an isolated sandbox (not the real system this checks) — confirmed to run without errors.
#!/bin/sh
# OVAL Definition: oval:mil.disa.stig.rhel9os:def:258133
if ! grep -q '^\\s*cache_credentials\\s*=\\s*true\\b' /etc/sssd/sssd.conf /etc/sssd/conf.d/*.conf && \
(grep -q '^\\s*offline_credentials_expiration\\s*=\\s*1\\s*' /etc/sssd/sssd.conf || grep -q '^\\s*offline_credentials_expiration\\s*=\\s*1\\s*' /etc/sssd/conf.d/*.conf); then
echo "PASS"
exit 0
else
echo "FAIL"
exit 1
fi