TMAegisBeta
Aturan lainnya untuk azure-container-linux

Azure Container Linux

TMA-AZURE-CONTAINER-LINUX-5.5.1.4

Ensure inactive password lock is 30 days or less

TinggiLevel 1Otomatisazure-container-linux

Deskripsi

User accounts that have been inactive for over a given period of time can be automatically disabled. It is recommended that accounts that are inactive for 30 days after password expiration be disabled. Audit: Passes when the INACTIVE default in /etc/default/useradd (as shown by useradd -D) and the inactivity period of every account with a password in /etc/shadow are between 0 and 30 days (-1 or an empty field means no lock and fails).

Cara pemeriksaan

Metode audit: Perintah shell

shell
bad=0; [ -r /etc/shadow ] || exit 1; v=$(sed -n "s/^INACTIVE=//p" /etc/default/user[a]dd 2>/dev/null | tail -1); [ -n "$v" ] && [ "$v" -ge 0 ] && [ "$v" -le 30 ] || bad=1; for x in $(awk -F: '$2 ~ /^[^*!xX]/ && $2 != "" {print ($7==""?"-1":$7)}' /etc/shadow); do [ "$x" -ge 0 ] && [ "$x" -le 30 ] || bad=1; done; [ $bad -eq 0 ] && echo compliant || echo noncompliant
Output yang diharapkan
compliant

Cara perbaikan

Metode perbaikan: Panduan atau patch infrastruktur

Run the following command to set the default password inactivity period to 30 days: # useradd -D -f 30 Modify user parameters for all users with a password set to match: # chage --inactive 30 <user>

Properti

Sistem operasi
Apa saja
Tag
azure-container-linuxpasswordsaging
Referensi
CIS Azure Container Linux Benchmark v1.0.0 - 5.5.1.4 Ensure inactive password lock is 30 days or less

Periksa host ini

Jalankan ini pada mesin yang diizinkan untuk Anda audit. Pemindaian bersifat hanya baca.

shell
tmaegis scan --target azure-container-linux