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