openldap关闭匿名访问

 ldap
 

openldap关闭匿名访问

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
[root@master01 .ldap]# cat disable_anon.ldif 
dn: cn=config
changetype: modify
add: olcDisallows
olcDisallows: bind_anon
-

dn: olcDatabase={-1}frontend,cn=config
changetype: modify
add: olcRequires
olcRequires: authc

ldapmodify -Y EXTERNAL -H ldapi:/// -f disable_anon.ldif

[root@master01 .ldap]# ldapsearch -x -H ldap://localhost:389
ldap_bind: Inappropriate authentication (48)
additional info: anonymous bind disallowed