TMAegisBeta
Más reglas para azure-container-linux

Azure Container Linux

TMA-AZURE-CONTAINER-LINUX-5.5.1.2

Ensure minimum days between password changes is configured

AltaNivel 1Automatizadaazure-container-linux

Descripción

The PASS_MIN_DAYS parameter in /etc/login.defs allows an administrator to prevent users from changing their password until a minimum number of days have passed since the last time the user changed their password. It is recommended that PASS_MIN_DAYS parameter be set to 1 or more days. Audit: Passes when PASS_MIN_DAYS in /etc/login.defs and the minimum age of every account with a password in /etc/shadow are 1 day or more.

Cómo se verifica

Método de auditoría: Comando de shell

shell
bad=0; [ -r /etc/shadow ] || exit 1; v=$(awk '/^[[:space:]]*PASS_MIN_DAYS[[:space:]]/{print $2}' /etc/login.defs | tail -1); [ -n "$v" ] && [ "$v" -ge 1 ] || bad=1; for x in $(awk -F: '$2 ~ /^[^*!xX]/ && $2 != "" {print $4}' /etc/shadow 2>/dev/null); do [ "$x" -ge 1 ] 2>/dev/null || bad=1; done; [ $bad -eq 0 ] && echo compliant || echo noncompliant
Salida esperada
compliant

Cómo se corrige

Método de corrección: Guía o parche de infraestructura

Set the PASS_MIN_DAYS parameter to 1 in /etc/login.defs: PASS_MIN_DAYS 1 Modify user parameters for all users with a password set to match: # chage --mindays 1 <user>

Propiedades

Sistemas operativos
Cualquiera
Etiquetas
azure-container-linuxpasswordsaging
Referencia
CIS Azure Container Linux Benchmark v1.0.0 - 5.5.1.2 Ensure minimum days between password changes is configured

Verificar este host

Ejecute esto en un equipo que tenga permiso para auditar. El escaneo es de solo lectura.

shell
tmaegis scan --target azure-container-linux