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.fso.aix11:def:112
# All global initialization files must be group-owned by sys, bin, system, or security.
# Per-module read mechanism curated from static teardown of DISA's SCC tool
# (SCAP Compliance Checker) -- see the SCC Automation Reference above.
# check /etc/.login file is group-owned by system, bin, sys, or security
# file_object (file_test)
test_1() {
( [ "$(stat -c '%g' '/etc/.login')" -eq 0 ] ) || ( [ "$(stat -c '%g' '/etc/.login')" -eq 2 ] ) || ( [ "$(stat -c '%g' '/etc/.login')" -eq 3 ] ) || ( [ "$(stat -c '%g' '/etc/.login')" -eq 7 ] )
}
# check /etc/profile file is group-owned by system, bin, sys, or security
# file_object (file_test)
test_2() {
( [ "$(stat -c '%g' '/etc/profile')" -eq 0 ] ) || ( [ "$(stat -c '%g' '/etc/profile')" -eq 2 ] ) || ( [ "$(stat -c '%g' '/etc/profile')" -eq 3 ] ) || ( [ "$(stat -c '%g' '/etc/profile')" -eq 7 ] )
}
# check /etc/bashrc file is group-owned by system, bin, sys, or security
# file_object (file_test)
test_3() {
( [ "$(stat -c '%g' '/etc/bashrc')" -eq 0 ] ) || ( [ "$(stat -c '%g' '/etc/bashrc')" -eq 2 ] ) || ( [ "$(stat -c '%g' '/etc/bashrc')" -eq 3 ] ) || ( [ "$(stat -c '%g' '/etc/bashrc')" -eq 7 ] )
}
# check /etc/environment file is group-owned by system, bin, sys, or security
# file_object (file_test)
test_4() {
( [ "$(stat -c '%g' '/etc/environment')" -eq 0 ] ) || ( [ "$(stat -c '%g' '/etc/environment')" -eq 2 ] ) || ( [ "$(stat -c '%g' '/etc/environment')" -eq 3 ] ) || ( [ "$(stat -c '%g' '/etc/environment')" -eq 7 ] )
}
# check /etc/security/environ file is group-owned by system, bin, sys, or security
# file_object (file_test)
test_5() {
( [ "$(stat -c '%g' '/etc/security/environ')" -eq 0 ] ) || ( [ "$(stat -c '%g' '/etc/security/environ')" -eq 2 ] ) || ( [ "$(stat -c '%g' '/etc/security/environ')" -eq 3 ] ) || ( [ "$(stat -c '%g' '/etc/security/environ')" -eq 7 ] )
}
# check /etc/security/.profile file is group-owned by system, bin, sys, or security
# file_object (file_test)
test_6() {
( [ "$(stat -c '%g' '/etc/security/.profile')" -eq 0 ] ) || ( [ "$(stat -c '%g' '/etc/security/.profile')" -eq 2 ] ) || ( [ "$(stat -c '%g' '/etc/security/.profile')" -eq 3 ] ) || ( [ "$(stat -c '%g' '/etc/security/.profile')" -eq 7 ] )
}
# check /etc/csh.login file is group-owned by system, bin, sys, or security
# file_object (file_test)
test_7() {
( [ "$(stat -c '%g' '/etc/csh.login')" -eq 0 ] ) || ( [ "$(stat -c '%g' '/etc/csh.login')" -eq 2 ] ) || ( [ "$(stat -c '%g' '/etc/csh.login')" -eq 3 ] ) || ( [ "$(stat -c '%g' '/etc/csh.login')" -eq 7 ] )
}
# check /etc/csh.cshrc file is group-owned by system, bin, sys, or security
# file_object (file_test)
test_8() {
( [ "$(stat -c '%g' '/etc/csh.cshrc')" -eq 0 ] ) || ( [ "$(stat -c '%g' '/etc/csh.cshrc')" -eq 2 ] ) || ( [ "$(stat -c '%g' '/etc/csh.cshrc')" -eq 3 ] ) || ( [ "$(stat -c '%g' '/etc/csh.cshrc')" -eq 7 ] )
}
if ( test_1 && test_2 && test_3 && test_4 && test_5 && test_6 && test_7 && test_8 ); 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.fso.aix11:def:112
if [ ! -f "/etc/.login" ]; then echo "PASS"; exit 0; fi; [ -g /etc/.login ] && [ $(stat -c "%G" /etc/.login) = system ] || [ $(stat -c "%G" /etc/.login) = bin ] || [ $(stat -c "%G" /etc/.login) = sys ] || [ $(stat -c "%G" /etc/.login) = security ] && echo "PASS" || echo "FAIL" && exit 1
if [ ! -f "/etc/profile" ]; then echo "PASS"; exit 0; fi; [ -g /etc/profile ] && [ $(stat -c "%G" /etc/profile) = system ] || [ $(stat -c "%G" /etc/profile) = bin ] || [ $(stat -c "%G" /etc/profile) = sys ] || [ $(stat -c "%G" /etc/profile) = security ] && echo "PASS" || echo "FAIL" && exit 1
if [ ! -f "/etc/bashrc" ]; then echo "PASS"; exit 0; fi; [ -g /etc/bashrc ] && [ $(stat -c "%G" /etc/bashrc) = system ] || [ $(stat -c "%G" /etc/bashrc) = bin ] || [ $(stat -c "%G" /etc/bashrc) = sys ] || [ $(stat -c "%G" /etc/bashrc) = security ] && echo "PASS" || echo "FAIL" && exit 1
if [ ! -f "/etc/environment" ]; then echo "PASS"; exit 0; fi; [ -g /etc/environment ] && [ $(stat -c "%G" /etc/environment) = system ] || [ $(stat -c "%G" /etc/environment) = bin ] || [ $(stat -c "%G" /etc/environment) = sys ] || [ $(stat -c "%G" /etc/environment) = security ] && echo "PASS" || echo "FAIL" && exit 1