TMAegis
tdsql のその他のルール

TMA-TDSQL-1.3

Ensure Interactive Login Is Disabled for TDSQL Service Accounts

中レベル 1自動tdsql

説明

The operating system accounts running TDSQL services should have interactive login disabled (shell set to /sbin/nologin or /bin/false). Passes when the tdsql account (and mysql, if present) has /sbin/nologin or /bin/false as its shell; FAILs when no tdsql account exists.

チェック方法

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

shell
u=$(getent passwd tdsql) || exit 1; bad=0; for a in tdsql mysql; do s=$(getent passwd "$a" | cut -d: -f7) || continue; case "$s" in /sbin/nologin|/usr/sbin/nologin|/bin/false|/usr/bin/false) ;; *) bad=1;; esac; done; [ $bad -eq 0 ] && echo compliant || echo 'interactive shell'
期待される出力
compliant

修正方法

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

usermod -s /sbin/nologin tdsql; usermod -s /sbin/nologin mysql

プロパティ

オペレーティングシステム
すべて
タグ
tdsqlservice-account
参照
CIS Tencent TDSQL 10.3.22 Benchmark v1.0.0 - 1.3 Ensure Interactive Login Is Disabled for TDSQL Service Accounts

このホストをチェック

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

shell
tmaegis scan --target tdsql