Azure Container Linux
TMA-AZURE-CONTAINER-LINUX-5.5.1.2
Ensure minimum days between password changes is configured
Beschreibung
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.
So wird geprüft
Prüfmethode: Shell-Befehl
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- Erwartete Ausgabe
compliant
So wird behoben
Behebungsmethode: Anleitung oder Infrastruktur-Patch
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>
Eigenschaften
- Betriebssysteme
- Beliebig
- Tags
- azure-container-linuxpasswordsaging
- Referenz
- CIS Azure Container Linux Benchmark v1.0.0 - 5.5.1.2 Ensure minimum days between password changes is configured
Diesen Host prüfen
Führen Sie dies auf einem Rechner aus, den Sie prüfen dürfen. Der Scan ist schreibgeschützt.
tmaegis scan --target azure-container-linux