Container-Optimized OS
TMA-COS-5.2.1
Ensure password creation requirements are configured
说明
The pam_passwdqc.so module checks the strength of passwords. It performs checks such as making sure a password is not a dictionary word, it is a certain length, contains a mix of characters (e.g. alphabet, numeric, other) and more based on the following options set in the /etc/security/passwdqc.conf: - min=disabled,disabled,disabled,disabled,14 - The password must be 14 characters or more and consists of four character classes. - max=40 - The maximum allowed password length is 40. - passphrase=3 - The number of words required for a passphrase is at least 3. - match=4 - The length of common substring required to conclude that a password is at least partially based on information found in a character string is 4. - similar=deny - The password that is similar to the old one is going to be denied. - random=47 - The size of randomly-generated passphrases in bits is 47. - enforce=everyone -...
检查方式
审计方法: Shell 命令
alt0() { command -v cat >/dev/null 2>&1 || { echo "step1: cat not installed"; return 1; }; o=$(bash -c 'cat /etc/security/passwdqc.conf' 2>&1); printf '%s\n' "$o" | tr -s ' \t' ' ' | sed 's/^ //;s/ $//' | grep -Fxq -- min=disabled,disabled,disabled,disabled,14 || { echo step1: missing min=disabled,disabled,disabled,disabled,14; return 1; }; printf '%s\n' "$o" | tr -s ' \t' ' ' | sed 's/^ //;s/ $//' | grep -Fxq -- max=40 || { echo step1: missing max=40; return 1; }; printf '%s\n' "$o" | tr -s ' \t' ' ' | sed 's/^ //;s/ $//' | grep -Fxq -- passphrase=3 || { echo step1: missing passphrase=3; return 1; }; printf '%s\n' "$o" | tr -s ' \t' ' ' | sed 's/^ //;s/ $//' | grep -Fxq -- match=4 || { echo step1: missing match=4; return 1; }; printf '%s\n' "$o" | tr -s ' \t' ' ' | sed 's/^ //;s/ $//' | grep -Fxq -- similar=deny || { echo step1: missing similar=deny; return 1; }; printf '%s\n' "$o" | tr -s ' \t' ' ' | sed 's/^ //;s/ $//' | grep -Fxq -- random=47 || { echo step1: missing random=47; return 1; }; printf '%s\n' "$o" | tr -s ' \t' ' ' | sed 's/^ //;s/ $//' | grep -Fxq -- enforce=everyone || { echo step1: missing enforce=everyone; return 1; }; printf '%s\n' "$o" | tr -s ' \t' ' ' | sed 's/^ //;s/ $//' | grep -Fxq -- retry=3 || { echo step1: missing retry=3; return 1; }; }; if alt0; then echo compliant; fi- 预期输出
compliant
修复方式
修复方法: 操作指南或基础设施补丁
Edit the file /etc/security/passwdqc.conf and add or modify the following lines for password length and complexity to conform to site policy: min=disabled,disabled,disabled,disabled,14 max=40 passphrase=3 match=4 similar=deny random=47 enforce=everyone retry=3 Edit the /etc/pam.d/system-auth files to include the appropriate options for pam_passwdqc.so and to conform to site policy: password required pam_passwdqc.so config=/etc/security/passwdqc.conf
属性
- 操作系统
- 任意
- 标签
- authcontainer-optimized-oscos
- 参考
- CIS Google Container-Optimized OS Benchmark v1.2.0 - 5.2.1 Ensure password creation requirements are configured
检查本机
请在您有权审计的机器上运行此命令。扫描为只读操作。
tmaegis scan --target cos --level 2