TMAegisBeta
Više pravila za cos

Container-Optimized OS

TMA-COS-5.2.1

Ensure password creation requirements are configured

NiskaNivo 2Automatskacos

Opis

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 -...

Kako se proverava

Metod provere: Komanda ljuske

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
Očekivani izlaz
compliant

Kako se ispravlja

Metod ispravke: Smernica ili zakrpa infrastrukture

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

Svojstva

Operativni sistemi
Bilo koji
Oznake
authcontainer-optimized-oscos
Referenca
CIS Google Container-Optimized OS Benchmark v1.2.0 - 5.2.1 Ensure password creation requirements are configured

Proverite ovaj računar

Pokrenite ovo na računaru za koji imate dozvolu za proveru. Skeniranje radi u režimu samo za čitanje.

shell
tmaegis scan --target cos --level 2