发新话题
打印

[求助] LDAP设置问题

LDAP设置问题

LDAP设置问题
[root@localhost openldap]# vi slad.conf

#       by users read
#       by anonymous auth
#
# if no access controls are present, the default policy
# allows anyone and everyone to read anything but restricts
# updates to rootdn.  (e.g., "access to * by * read")
#
# rootdn can always read and write EVERYTHING!

#######################################################################
# ldbm and/or bdb database definitions
#######################################################################

database        bdb
suffix          "dc=twc,dc=sunrex,dc=com,dc=cn"
rootdn          "cn=Manager,dc=twc,dc=sunrex,dc=com,dc=cn"
# Cleartext passwords, especially for the rootdn, should
# be avoided.  See slappasswd(8) and slapd.conf(5) for details.
# Use of strong authentication encouraged.
rootpw         secret
# rootpw                {crypt}ijFYNcSNctBYg

# The database directory MUST exist prior to running slapd AND
# should only be accessible by the slapd and slap tools.
# Mode 700 recommended.
directory       /var/lib/ldap

# Indices to maintain for this database
index objectClass                       eq,pres
index ou,cn,mail,surname,givenname      eq,pres,sub
index uidNumber,gidNumber,loginShell    eq,pres
index uid,memberUid                     eq,pres,sub
index nisMapName,nisMapEntry            eq,pres,sub

# Replicas of this database
#replogfile /var/lib/ldap/openldap-master-replog
#replica host=ldap-1.example.com:389 starttls=critical
#     bindmethod=sasl saslmech=GSSAPI
#     authcId=host/ldap-master.example.com@EXAMPLE.COM
[root@localhost openldap]# ldap restart
-bash: ldap: command not found
[root@localhost openldap]# service ldap restart
Stopping slapd: [  OK  ]
Checking configuration files for slapd:  [  OK  ]
Starting slapd: [  OK  ]
[root@localhost openldap]# ldapsearch -x -b '' -s base '(objectclass=*)' namingContexts
# extended LDIF
#
# LDAPv3
# base <> with scope base
# filter: (objectclass=*)
# requesting: namingContexts
#

#
dn:
namingContexts: dc=my-domain,dc=com

# search result
search: 2
result: 0 Success

# numResponses: 2
# numEntries: 1

大家帮看一下,我配置的域和语法查出的不一致,是什么原因,我的qq:552667387,谢谢告知!

TOP

就是没有人回,失败

TOP

比较正确的搜索方法:

ldapsearch -x -b 'dc=twc,dc=sunrex,dc=com,dc=cn'  "(objectclass=*)"
请引用或摘抄本站文章信息的朋友,保留本站链接及作者信息,保护版权,谢谢。

构建高性能大容量开源邮件系统- ExtMail

Postfix在中国官方网站

TOP

多谢老大,非常感谢!

TOP

发新话题