TMA-COS-5.3.1.5
Ensure all users last password change date is in the past
高级别 1自动化cos
说明
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.
检查方式
审计方法: Shell 命令
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- 预期输出
compliant
修复方式
修复方法: 操作指南或基础设施补丁
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.
属性
- 操作系统
- 任意
- 标签
- authcontainer-optimized-oscos
- 参考
- CIS Google Container-Optimized OS Benchmark v1.2.0 - 5.3.1.5 Ensure all users last password change date is in the past
检查本机
请在您有权审计的机器上运行此命令。扫描为只读操作。
shell
tmaegis scan --target cos