TMAegisBêta
Plus de règles pour cos

Container-Optimized OS

TMA-COS-5.3.1.3

Ensure password expiration warning days is 7 or more

ÉlevéeNiveau 1Automatiséecos

Description

The PASS_WARN_AGE parameter in /etc/login.defs allows an administrator to notify users that their password will expire in a defined number of days. It is recommended that the PASS_WARN_AGE parameter be set to 7 or more days. Providing an advance warning that a password will be expiring gives users time to think of a secure password. Users caught unaware may choose a simple password or write it down where it may be discovered.

Méthode de vérification

Méthode d'audit: Commande shell

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

Méthode de correction

Méthode de correction: Recommandation ou correctif d'infrastructure

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

Propriétés

Systèmes d'exploitation
Tous
Étiquettes
authcontainer-optimized-oscos
Référence
CIS Google Container-Optimized OS Benchmark v1.2.0 - 5.3.1.3 Ensure password expiration warning days is 7 or more

Vérifier cet hôte

Exécutez cette commande sur une machine que vous êtes autorisé à auditer. L'analyse est en lecture seule.

shell
tmaegis scan --target cos