TMAegisBeta
More rules for cos

Container-Optimized OS

TMA-COS-5.3.1.5

Ensure all users last password change date is in the past

HighLevel 1Automatedcos

Description

All users should have a password change date in the past. If a users recorded password change date is in the future then they could bypass any set password expiration.

How it is checked

Audit method: Shell command

shell
[ -r /etc/shadow ] || exit 1; t=$(( $(date +%s) / 86400 )); awk -F: -v t=$t '$2 ~ /^[^*!xX]/ && $3 != "" && $3+0 > t {f=1} END{exit f}' /etc/shadow && echo compliant || echo noncompliant
Expected output
compliant

How it is fixed

Fix method: Guidance or infrastructure patch

Investigate any users with a password change date in the future and correct them. Locking the account, expiring the password, or resetting the password manually may be appropriate.

Properties

Operating systems
Any
Tags
authcontainer-optimized-oscos
Reference
CIS Google Container-Optimized OS Benchmark v1.2.0 - 5.3.1.5 Ensure all users last password change date is in the past

Check this host

Run this on a machine you are allowed to audit. The scan is read-only.

shell
tmaegis scan --target cos