MariaDB
TMA-MARIADB-1.5
Ensure Interactive Login is Disabled
Trung bìnhCấp 2Tự độngmariadb
Mô tả
When created, the MariaDB user may have interactive access to the operating system, which means that the MariaDB user could login to the host as any other user would. Checks that the mysql account has /bin/false or nologin as its shell.
Cách kiểm tra
Phương pháp kiểm tra: Lệnh shell
shell
out=$(getent passwd mysql 2>/dev/null) || exit 1; s=${out##*:}; case "$s" in /bin/false|/usr/bin/false|/sbin/nologin|/usr/sbin/nologin) echo compliant ;; *) echo "$s" ;; esac- Đầu ra mong đợi
compliant
Cách khắc phục
Phương pháp khắc phục: Lệnh shell
shell
usermod -s /bin/false mysqlThuộc tính
- Hệ điều hành
- Bất kỳ
- Thẻ
- mariadbdatabaseosauthentication
- Tham chiếu
- CIS MariaDB 10.11 Benchmark v1.0.0 - 1.5 Ensure Interactive Login is Disabled
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 mariadb --level 2