Chinaunix首页 | 论坛 | 博客
  • 博客访问: 3343389
  • 博文数量: 815
  • 博客积分: 12898
  • 博客等级: 上将
  • 技术积分: 7883
  • 用 户 组: 普通用户
  • 注册时间: 2006-12-25 09:57
文章分类

全部博文(815)

文章存档

2014年(1)

2011年(46)

2010年(192)

2009年(121)

2008年(70)

2007年(385)

分类: BSD

2007-10-12 13:18:40

# 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) |
0

上一篇:RPM HOWTO 中译本介绍

下一篇:Mail 调试

给主人留下些什么吧!~~