|
我的系统是rh9, 装的是OpenLDAP,从rh9的安装光盘中自带的。
我的主配制文件如下:(slapd.conf)
include /etc/openldap/schema/core.schema
include /etc/openldap/schema/cosine.schema
include /etc/openldap/schema/inetorgperson.schema
include /etc/openldap/schema/nis.schema
include /etc/openldap/schema/redhat/rfc822-MailMember.schema
include /etc/openldap/schema/redhat/autofs.schema
include /etc/openldap/schema/redhat/kerberosobject.schema
access to dn="" by * read
access to *
by self write
by users read
by anonymous auth
database ldbm
suffix "dc=khsun,dc=com"
rootdn "cn=ghw,dc=khsun,dc=com"
rootpw secret
directory /var/lib/ldap
index objectClass,uid,uidNumber,gidNumber,memberUid eq
index cn,mail,surname,givenname eq,subinitial
配置文件 ldap.conf 内容如下:
HOST 127.0.0.1
BASE dc=khsun,dc=com
启动ldap服务器:/etc/rc.d/init.d/ldap start
测试服务器:ldapsearch -x -b '' -s base '(objectclass=*)' namingContexts
成功返回如下信息:
version: 2
#
# filter: (objectclass=*)
# requesting: namingContexts
#
#
dn:
namingContexts: dc=khsun,dc=com
# search result
search: 2
result: 0 Success
# numResponses: 2
# numEntries: 1
然后手动添加数据:ldapadd -D "cn=ghw,dc=khsun,dc=com" -W -v -h localhost
提示如下:
ldap_init( localhost, 0 )
Enter LDAP Password:
ldap_sasl_interactive_bind_s: No such attribute
这是什么原因呢?
请大家帮忙看看。
谢谢。 |
|