TMAegisBeta
azure-container-linux için daha fazla kural

Azure Container Linux

TMA-AZURE-CONTAINER-LINUX-5.5.1.2

Ensure minimum days between password changes is configured

YüksekDüzey 1Otomatikazure-container-linux

Açıklama

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.

Nasıl denetlenir

Denetim yöntemi: Kabuk komutu

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
Beklenen çıktı
compliant

Nasıl düzeltilir

Düzeltme yöntemi: Kılavuz veya altyapı yaması

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>

Özellikler

İşletim sistemleri
Herhangi biri
Etiketler
azure-container-linuxpasswordsaging
Referans
CIS Azure Container Linux Benchmark v1.0.0 - 5.5.1.2 Ensure minimum days between password changes is configured

Bu ana makineyi denetle

Bunu denetleme izniniz olan bir makinede çalıştırın. Tarama salt okunurdur.

shell
tmaegis scan --target azure-container-linux