TMAegisベータ
linux のその他のルール

Linux distributions

TMA-ROCKY8-5.3.3.2.6

Ensure password dictionary check is enabled

中レベル 1自動linux

説明

The pwquality dictcheck option sets whether to check for the words from the cracklib dictionary.

チェック方法

監査方法: シェルコマンド

shell
alt0() { command -v grep >/dev/null 2>&1 || { echo "step1: grep not installed"; return 1; }; o=$(bash -c 'grep -Psi -- '"'"'^\h*dictcheck\h*=\h*0\b'"'"' /etc/security/pwquality.conf /etc/security/pwquality.conf.d/*.conf' 2>/dev/null); [ -z "$o" ] || { echo "step1: $o" | head -c 300; return 1; }; o=$(bash -c 'grep -Psi -- '"'"'^\h*password\h+(requisite|required|sufficient)\h+pam_pwquality\.so\h+([^#\n r]+\h+)?dictcheck\h*=\h*0\b'"'"' /etc/pam.d/system-auth /etc/pam.d/password-auth' 2>/dev/null); [ -z "$o" ] || { echo "step2: $o" | head -c 300; return 1; }; }; if alt0; then echo compliant; fi
期待される出力
compliant

修正方法

修正方法: ガイダンスまたは IaC パッチ

Edit any file ending in .conf in the /etc/security/pwquality.conf.d/ directory and/or the file /etc/security/pwquality.conf and comment out or remove any instance of dictcheck = 0: Example: # sed -ri 's/^\s*dictcheck\s*=/# &/' /etc/security/pwquality.conf /etc/security/pwquality.conf.d/*.conf Run the following script to remove setting dictcheck on the pam_pwquality.so module in the PAM files: #!/usr/bin/env bash { for l_pam_file in system-auth password-auth; do l_authselect_file="/etc/authselect/$(head -1 /etc/authselect/authselect.conf | grep 'custom/')/$l_pam_file" sed -ri 's/(^\s*password\s+(requisite|required|sufficient)\s+pam_pwquality\.so.*)(\s+ dictcheck\s*=\s*\S+)(.*$)/\1\4/' "$l_aut…

プロパティ

オペレーティングシステム
rocky-8
タグ
cis-convertedlinux
参照
CIS Rocky Linux 8 Benchmark v3.0.0 - 5.3.3.2.6

このホストをチェック

監査が許可されているマシンで実行してください。スキャンは読み取り専用です。

shell
tmaegis scan --target linux