TMA-TDSQL-1.3
Ensure Interactive Login Is Disabled for TDSQL Service Accounts
Trung bìnhCấp 1Tự độngtdsql
Mô tả
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.
Cách kiểm tra
Phương pháp kiểm tra: Lệnh shell
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'- Đầu ra mong đợi
compliant
Cách khắc phục
Phương pháp khắc phục: Hướng dẫn hoặc bản vá hạ tầng
usermod -s /sbin/nologin tdsql; usermod -s /sbin/nologin mysql
Thuộc tính
- Hệ điều hành
- Bất kỳ
- Thẻ
- tdsqlservice-account
- Tham chiếu
- CIS Tencent TDSQL 10.3.22 Benchmark v1.0.0 - 1.3 Ensure Interactive Login Is Disabled for TDSQL Service Accounts
Kiểm tra máy này
Chạy lệnh này trên máy bạn được phép kiểm tra. Lần quét chỉ ở chế độ đọc.
shell
tmaegis scan --target tdsql