TMA-KERBEROS-KADM5-ACL-PERMS
Ensure kadm5.acl is owned by root and not writable by group or others
CaoCấp 1Tự độngkerberos
Mô tả
kadm5.acl decides which principals may administer the Kerberos database; whoever can edit it can grant themselves full kadmin rights. Checks /etc/krb5kdc/kadm5.acl (Debian/Ubuntu) and /var/kerberos/krb5kdc/kadm5.acl (RHEL, default 600 root): owner root, no group or other write.
Cách kiểm tra
Phương pháp kiểm tra: Lệnh shell
shell
n=0; bad=0
for f in /etc/krb5kdc/kadm5.acl /var/kerberos/krb5kdc/kadm5.acl; do
[ -f "$f" ] || continue
n=$((n+1))
o=$(stat -Lc %U "$f") || exit 1
[ "$o" = root ] || { echo "$f owned by $o"; bad=1; }
[ -z "$(find -L "$f" -maxdepth 0 -perm /022)" ] || { echo "$f is group/other writable"; bad=1; }
done
[ "$n" -gt 0 ] && [ "$bad" -eq 0 ] && echo compliant- Đầu ra mong đợi
compliant
Cách khắc phục
Phương pháp khắc phục: Lệnh shell
shell
for f in /etc/krb5kdc/kadm5.acl /var/kerberos/krb5kdc/kadm5.acl; do if [ -f "$f" ]; then chown root:root "$f" && chmod 600 "$f" || exit 1; fi; doneThuộc tính
- Hệ điều hành
- Bất kỳ
- Thẻ
- kerberoskdcpermissions
- Tham chiếu
- CIS MIT Kerberos / Linux Benchmark guidance - KDC configuration file permissions (verify section number for your release)
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 kerberos