加载日志模块: 2.4.4 版本系统默认有
cat > /root/loglevel.ldif << “EOF”
dn: cn=config
changetype: modify
replace: olcLogLevel
olcLogLevel: stats
EOF
ldapmodify -Y EXTERNAL -H ldapi:/// -f /root/loglevel.ldif
systemctl restart slapd
配置rsyslog.conf
cat >> /etc/rsyslog.conf << EOF
local4.* /var/log/slapd.log
EOF
systemctl restart rsyslog
禁止匿名用户登录
cat > /root/disable_anon.ldif << EOF
dn: cn=config
changetype: modify
add: olcDisallows
olcDisallows: bind_anon
dn: cn=config
changetype: modify
add: olcRequires
olcRequires: authc
dn: olcDatabase={-1}frontend,cn=config
changetype: modify
add: olcRequires
olcRequires: authc
EOF
ldapadd -Y EXTERNAL -H ldapi:/// -f /root/disable_anon.ldif