# ps -aux | grep 'openldap'
_openldap 5909 0.0 1.9 12032 3096 ?? Ss 9:04PM 0:00.06 /usr/local/libexec/slapd -u _openldap -g _openldap
#
配置文件
# cat /etc/openldap/slapd.conf | grep -v ^#
include /etc/openldap/schema/core.schema
include /etc/openldap/schema/corba.schema
include /etc/openldap/schema/cosine.schema
include /etc/openldap/schema/inetorgperson.schema
include /etc/openldap/schema/nis.schema
include /etc/openldap/schema/courier.schema
pidfile /var/run/openldap/slapd.pid
argsfile /var/run/openldap/slapd.args
loglevel 256
database ldbm
suffix "dc=atyu30,dc=com"
rootdn "cn=Manager,dc=atyu30,dc=com"
rootpw {SSHA}sWHklilhI+N0NJMzNJBXuhIwQPmCWP6N
directory /var/openldap-data
index objectClass eq
添加区域
# ldapadd -x -D "cn=Manager,dc=atyu30,dc=com" -W -f root.ldif
Enter LDAP Password:
adding new entry "dc=atyu30,dc=com"
ldap_add: Constraint violation (19)
additional info: dc: multiple values provided
root.ldif
dn: dc=atyu30,dc=com
objectclass: dcObject
objectclass: organization
dc: atyu30
dc: atyu30
查看结果
# ldapsearch -x -D 'cn=Manager,dc=atyu30,dc=com' -b 'dc=atyu30,dc=com' -W
Enter LDAP Password:
# extended LDIF
#
# LDAPv3
# base with scope subtree
# filter: (objectclass=*)
# requesting: ALL
#
# search result
search: 2
result: 32 No such object
# numResponses: 1
#
日志
# tail /var/log/openldap
Oct 12 21:09:47 mail slapd[5909]: conn=1 op=0 RESULT tag=97 err=49 text=
Oct 12 21:09:47 mail slapd[5909]: conn=1 fd=11 closed (connection lost)
Oct 12 21:10:08 mail slapd[5909]: conn=2 fd=11 ACCEPT from IP=::1 35896 (IP=:: 389)
Oct 12 21:10:08 mail slapd[5909]: conn=2 op=0 BIND dn="cn=Manager,dc=atyu30,dc=com" method=128
Oct 12 21:10:08 mail slapd[5909]: conn=2 op=0 BIND dn="cn=Manager,dc=atyu30,dc=com" mech=SIMPLE ssf=0
Oct 12 21:10:08 mail slapd[5909]: conn=2 op=0 RESULT tag=97 err=0 text=
Oct 12 21:10:08 mail slapd[5909]: conn=2 op=1 SRCH base="dc=atyu30,dc=com" scope=2 deref=0 filter="(objectClass=*)"
Oct 12 21:10:08 mail slapd[5909]: conn=2 op=1 SEARCH RESULT tag=101 err=32 nentries=0 text=
Oct 12 21:10:08 mail slapd[5909]: conn=2 op=2 UNBIND
Oct 12 21:10:08 mail slapd[5909]: conn=2 fd=11 closed
#
阅读(3406) | 评论(1) | 转发(0) |