openldap的详细配置!(转)

来源:互联网 发布:软件黑客联系方式 编辑:程序博客网 时间:2024/05/16 07:44
我刚刚配完openldap具体如下:
安装软件包需要注意的问题 
编译 
编译和优化 
清除不必要的文件 

配置 
配置“/etc/ldap/slapd.conf”文件 
配置“/etc/rc.d/init.d/ldap”脚本文件 
更多的资料 

保证OpenLDAP的安全 
使得重要的配置文件不可改变 

OpenLDAP的创建和维护工具 
离线创建数据库 
IDIF输入文件(用文本表示的输入文件) 
为LDAP创建数据库 
ldapmodify 

OpenLDAP的用户工具 
搜索LDAP的数据项 

安装到系统中的文件 

概述 
LDAP(Lightweight Directory Access Protocol)是用来访问信息服务的标准协议。这个协议是用在Internet传输协议上,如:TCP,能够访问单独的目录服务或X.500目录。 

注意事项 

下面所有的命令都是Unix兼容的命令。 
源路径都为“/var/tmp”(当然在实际情况中也可以用其它路径)。 
安装在RedHat Linux 6.1下测试通过。 
要用“root”用户进行安装。 
OpenLDAP的版本号是1_2_8。 

软件包的来源 
OpenLDAP的主页:http://www.openldap.org/。 

下载:openldap-1_2_8.tgz。 

安装软件包需要注意的问题 
最好在编译前和编译后都做一张系统中所有文件的列表,然后用“diff”命令去比较它们,找出其中的差别并知道到底把软件安装在哪里。只要简单地在编译之前运行一下命令“find /* >;ldap1”,在编译和安装完软件之后运行命令“find /* >; ldap2”,最后用命令“diff ldap1 ldap2 >; ldap”找出变化。 

编译 
把软件包(tar.gz)解压缩: 

[root@deep]# cp openldap-version.tgz /var/tmp 
[root@deep]# cd /var/tmp/ 
[root@deep]# tar xzpf openldap-version.tgz 

编译和优化 
转到OpenLDAP的新目录下。 

编辑“string.h”文件(vi +52 include/ac/string.h),删掉这些几行: 

#else 
/* some systems have strdup(), but fail to declare it */ 
extern char *(strdup)()&#59; 

上面的这几行对Linux系统是没有用的必须删掉。 

下面设置编译器的编译参数: 

CC="egcs" 
CFLAGS="-O9 -funroll-loops -ffast-math -malign-double -mcpu=pentiumpro -march=pentiumpro -fomit-frame- 
pointer -fno-exceptions" 
./configure 
--prefix=/usr 
--libexecdir=/usr/sbin 
--localstatedir=/var/run 
--sysconfdir=/etc 
--enable-shared 
--with-gnu-ld 

这些编译参数告诉编译器如何编译OpenLDAP: 

l 编译共享库 
l 假定C编译器使用GNU ld 

开始编译: 

[root@deep]# make depend 
[root@deep]# make 
[root@deep]# cd tests/ 
[root@deep]# make 
[root@deep]# cd .. 
[root@deep]# make install 

“make depend”命令编译必要的相关文件,“make”把源文件编译成可执行的二进制文件。“make install”把二进制文件和相关的配置文件安装到相应的目录中去。在“test”目录下的“make”命令在安装LDAP服务器之前进行一些必要的测试保证软件安装完成后能正常运行。如何测试失败在继续安装之前先要解决这些问题。 

[root@deep]# install -d -m 700 /var/ldap 
[root@deep]# echo localhost >; /etc/openldap/ldapserver 
[root@deep]# strip /usr/lib/liblber.so.1.0.0 
[root@deep]# strip /usr/lib/libldap.so.1.0.0 
[root@deep]# strip /usr/lib/libldap.a 
[root@deep]# strip /usr/lib/liblber.a 
[root@deep]# strip /usr/sbin/in.xfingerd 
[root@deep]# strip /usr/sbin/go500 
[root@deep]# strip /usr/sbin/go500gw 
[root@deep]# strip /usr/sbin/mail500 
[root@deep]# strip /usr/sbin/rp500 
[root@deep]# strip /usr/sbin/fax500 
[root@deep]# strip /usr/sbin/rcpt500 
[root@deep]# strip /usr/sbin/slapd 
[root@deep]# strip /usr/sbin/ldif2ldbm 
[root@deep]# strip /usr/sbin/ldif2index 
[root@deep]# strip /usr/sbin/ldif2id2entry 
[root@deep]# strip /usr/sbin/ldif2id2children 
[root@deep]# strip /usr/sbin/ldbmcat 
[root@deep]# strip /usr/sbin/ldif 
[root@deep]# strip /usr/sbin/centipede 
[root@deep]# strip /usr/sbin/ldbmtest 
[root@deep]# strip /usr/sbin/slurpd 
[root@deep]# strip /usr/bin/ud 
[root@deep]# strip /usr/bin/ldapadd 
[root@deep]# strip /usr/bin/ldapsearch 
[root@deep]# strip /usr/bin/ldapmodify 
[root@deep]# strip /usr/bin/ldapmodrdn 
[root@deep]# strip /usr/bin/ldappasswd 
[root@deep]# strip /usr/bin/ldapdelete 

上面的“install”命令在“/var”目录下创建一个名为“ldap”的新目录并且把它的属性设成只能被超级用户“root”读、写和执行。 

“strip”命令清除目标文件中所有的符号信息,这样可执行文件就会更小,能够提高一点程序的性能。 

清除不必要的文件 
用下面的命令删除不必要的文件: 

[root@deep]# cd /var/tmp 
[root@deep]# rm -rf ldap openldap-version.tgz 

“rm”命令删除所有编译和安装OpenLDAP所需要的源程序,并且把“/var/tmp”目录下的OpenLDAP软件的压缩包删除掉。 

配置 
可以到这去下载“floppy.tgz”文件:http://pages.infinit.net/lotus1/doc/opti/floppy.tgz。把“floppy.tgz”文件解开之后,可以在相应的目录下发现我们在这本书中介绍的所有软件的配置文件。这样就没有必要手工重新生成这些文件,或者用拷贝粘贴的方法把它们粘贴到配置文件中去。不管是打算自己动手生成配置文件还是拷贝现成的,你都要学会自己修改配置文件并且把配置文件拷贝到正确的目录下。下面将具体说明。 

为了运行OpenLDAP,必须创建或者把下面的文件拷贝到相应的目录下: 

l 把“slapd.conf”文件拷贝到“/etc/openldap”目录下 
l 把“ldap”文件拷贝到“/etc/rc.d/init.d”目录下 

可以把“floppy.tgz”解压之后,找到上面列出来的文件,并拷贝到“/etc/ssh”目录下,或者用拷贝粘贴的方法从本书中直接粘贴出。 

配置“/etc/ldap/slapd.conf”文件 
“/etc/openldap/slapd.conf”文件是LDAP服务器最重要的配置文件,配置权限、口令、数据库类型和数据库位置等等。 

编辑“slap.conf”文件(vi /etc/openldap/slapd.conf)加入: 


# See slapd.conf(5) for details on configuration options. 
# This file should NOT be world readable. 

include /etc/openldap/slapd.at.conf 
include /etc/openldap/slapd.oc.conf 
schemacheck off 
#referral ldap://ldap.itd.umich.edu 
pidfile /var/run/slapd.pid 
argsfile /var/run/slapd.args 
####################################################################### 
# ldbm database definitions 
####################################################################### 
database ldbm 
suffix "o=openarch, c=com" 
directory /var/ldap 
rootdn "cn=admin, o=openarch, c=com" 
rootpw secret 
# cleartext passwords, especially for the rootdn, should 
# be avoid. See slapd.conf(5) for details. 
# ldbm indexed attribute definitions 
index cn,sn,uid 
index objectclass pres,eq 
index default none 
# ldbm access control definitions 
defaultaccess read 
access to attr=userpassword 
by self write 
by dn="cn=admin, o=openarch, c=com" write 
by * compare 

下面解释一下上面配置文件中的一些设置: 

suffix “o=openarch, c=com” 

suffix(后缀)设置想要创建的子树的根的DN(distinguished name)。换句话说,就是表示数据库中到底放些什么。 

directory /var/ldap 

设置LDAP数据库和索引文件所在的目录。必须设置为“/var/ldap”因为我们在安装阶段已经指定了LDAP的后台数据库。 

rootdn “cn=admin, o=openarch, c=com” 

设置管理LDAP目录的超级用户的DN。这个用户名(admin)并不要出现在“/etc/passwd”文件里。 

rootpw secret 

设置这个数据库的超级用户的口令验证方式。也就是上面“rootdn”设置的用户的口令。千万不要用明文进行口令验证,一定要用加密的口令。 

index cn,sn,uid | index objectclass pres,eq | index default none 

这三句设置在数据库中创建和维护怎样的索引。“index cn,sn,uid)为cn、sn和uid属性创建和维护索引,“index objectclass pres,eq”为objectclass属性创建相等索引(equality indexes),“index default none”表示不为别的属性创建索引。查看用户手册可以得到更多的信息。 

“slapd.conf”文件中的最后一部分是和LDAP目录的访问控制相关的。 

defaultaccess read 
access to attr=userpassword 
by self write 
by dn="cn=admin, o=openarch, c=com" write 
by * compare 

这些设置对“o=openarch,c=com”子树中的所有项都是有效的。任何人都有读的权限,除了“userpasswd”属性拥有这一项的用户可以改变其它所有的属性。“userpassword”属性只能被admin修改,但是任何人都可以比较。查看用户手册可以得到更多的信息。 

配置“/etc/rc.d/init.d/ldap”脚本文件 
配置“/etc/rc.d/init.d/ldap”脚本文件用来启动和停止ldap服务。 

创建“ldap”脚本文件(touch /etc/rc.d/init.d/ldap)并加入: 

#!/bin/sh 

# ldap This shell script takes care of starting and stopping 
# ldap servers (slapd and slurpd). 

# chkconfig: - 70 40 
# description: LDAP stands for Lightweight Directory Access Protocol, used 
# for implementing the industry standard directory services. 
# processname: slapd 
# config: /etc/openldap/slapd.conf 
# pidfile: /var/run/slapd.pid 
# Source function library. 
. /etc/rc.d/init.d/functions 
# Source networking configuration. 
. /etc/sysconfig/network 
# Check that networking is up. 
[ ${NETWORKING} = "no" ] && exit 0 
[ -f /usr/sbin/slapd ] || exit 0 
[ -f /usr/sbin/slurpd ] || exit 0 
RETVAL=0 
# See how we were called. 
case "$1" in 
start) 
# Start daemons. 
echo -n "Starting ldap: " 
daemon slapd 
RETVAL=$? 
if [ $RETVAL -eq 0 ]&#59; then 
if grep -q "^replogfile" /etc/openldap/slapd.conf&#59; then 
daemon slurpd 
RETVAL=$? 
[ $RETVAL -eq 0 ] && pidof slurpd | cut -f 1 -d " " >; /var/run/slurpd 
fi 
fi 
echo 
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/ldap 
&#59;&#59; 
stop) 
# Stop daemons. 
echo -n "Shutting down ldap: " 
killproc slapd 
RETVAL=$? 
if [ $RETVAL -eq 0 ]&#59; then 
if grep -q "^replogfile" /etc/openldap/slapd.conf&#59; then 
killproc slurpd 
RETVAL=$? 
fi 
fi 
echo 
if [ $RETVAL -eq 0 ]&#59; then 
rm -f /var/lock/subsys/ldap 
rm -f /var/run/slapd.args 
fi 
&#59;&#59; 
status) 
status slapd 
RETVAL=$? 
if [ $RETVAL -eq 0 ]&#59; then 
if grep -q "^replogfile" /etc/openldap/slapd.conf&#59; then 
status slurpd 
RETVAL=$? 
fi 
fi 
&#59;&#59; 
restart) 
$0 stop 
$0 start 
RETVAL=$? 
&#59;&#59; 
reload) 
killproc -HUP slapd 
RETVAL=$? 
if [ $RETVAL -eq 0 ]&#59; then 
if grep -q "^replogfile" /etc/openldap/slapd.conf&#59; then 
killproc -HUP slurpd 
RETVAL=$? 
fi 
fi 
&#59;&#59; 
*) 
echo "Usage: $0 start|stop|restart|status}" 
exit 1 
esac 
exit $RETVAL 

使得脚本可执行并改变它的权限: 

[root@deep]# chmod 700 /etc/rc.d/init.d/ldap 

在rc.d目录中创建OpenLDAP脚本的符号链接: 

[root@deep]# chkconfig --add ldap 

当重新引导系统的时候,OpenLDAP脚本不会自动启动slapd脚本。可以用下面的命令让它可以自动启动: 

[root@deep]# chkconfig --level 345 ldap on 

用下面的命令也可以手工启动OpenLDAP服务器: 

[root@deep]# /etc/rc.d/init.d/ldap start 

更多的资料 
如果想查找详细的资料可以用man命令查帮助页,读取相关信息: 

$ man ldapd (8) - LDAP X.500 Protocol Daemon 
$ man ldapdelete (1) - ldap delete entry tool 
$ man ldapfilter.conf (5) - configuration file for LDAP get filter routines 
$ man ldapfriendly (5) - data file for LDAP friendly routines 
$ man ldapmodify, ldapadd (1) - ldap modify entry and ldap add entry tools 
$ man ldapmodrdn (1) - ldap modify entry RDN tool 
$ man ldappasswd (1) - change the password of an LDAP entry 
$ man ldapsearch (1) - ldap search tool 
$ man ldapsearchprefs.conf (5) - configuration file for LDAP search preference routines 
$ man ldaptemplates.conf (5) - configuration file for LDAP display template routines 
$ man ldif (5) - LDAP Data Interchange format 
$ man slapd (8) - Stand-alone LDAP Daemon 
$ man slapd.conf (5) - configuration file for slapd, the stand-alone LDAP daemon 
$ man slurpd (8) - Standalone LDAP Update Replication Daemon 
$ man ud (1) - interactive LDAP Directory Server query program 

保证OpenLDAP的安全 
使得重要的配置文件不可改变 
设置不可改变位可以避免需要保护的文件被意外的删除或者覆盖。也可以防止有人创建这个文件的符号链接。一旦“slapd.conf”文件配置完成了之后,用下面的命令设置不可改变位: 

[root@deep]# chattr +i /etc/openldap/slapd.conf 

OpenLDAP的创建和维护工具 
离线创建数据库 
如果一下子要创建成千上万的项(entry),用这个方法最合适了,因为用“ldapadd”命令逐个添加要花费相当长的时间。这个工具读取slapd的配置文件和用文本表示的包含所有需要添加的项的输入文件。“ldif2ldbm”的命令语法如下: 

[root@deep]# ldif2ldbm -i -f 

表示纯文本的LDIF输入文件的文件名。表示slapd配置文件的文件名,这个配置文件设置在什么地方创建索引、创建什么索引,等等。 

例如: 

[root@deep]# ldif2ldbm -i my-data-file -f /etc/openldap/slapd.conf 

纯文本的输入文件的文件名为“my-data-file” 

注意:离线创建数据库的时候slapd daemon不能运行。 

IDIF输入文件(用文本表示的输入文件) 
第一次安装OpenLDAP必须把大量的数据存入OpenLDAP的数据库里。最好把这些数据都用纯文本的文件表示出来,再用下面的命令把数据加入OpenLDAP数据库中。 

创建“my-data-file”文件(touch /tmp/my-data-file),下面加入的这些行可以作为参考: 

dn: o=openarch, c=com 
o: openarch 
objectclass: organization 
dn: cn=Ronald Smith, o=openarch, c=com 
cn: Ronald Smith 
sn: Smith 
telephonenumber: (480) 757-5856 
title: Operator. 
objectclass: top 

objectclass: person 
dn: cn=Anthony Bay, o=openarch, c=com 
cn: Anthony Bay 
sn: Bay 
homephone: (410) 896-3786 
mobile: (410) 833-0590 
mail: abay@openarch.com 
objectclass: top 
objectclass: person 
dn: cn=George Parker, o=openarch, c=com 
cn: George Parker 
sn: Parker 
telephonenumber: (414) 389-5695 
fax: (414) 778-8785 
mobile: (414) 470-8669 
description: E-Commerce. 
objectclass: top 
objectclass: person 

上面的例子文件让你了解了如何把数据库中的信息装成纯文本的信息,再把这些信息加入OpenLDAP数据库中。还有很多的设置选项可以满足你的需要,请查看OpenLDAP的文档或书籍,以获得更多的信息。 

为LDAP创建数据库 
就像可以往数据库中加入记录那样,也可以用“ldapadd”命令在LDAP中加入项。例如:用“ldapadd”命令加入“Europe Mourani”这一项,先要创建“/tmp/newentry”文件: 

创建“newentry”文件(touch /tmp/newentry),在文件中加入下面的内容: 

cn=Europe Mourani, o=openarch, c=com 
cn=Europe Mourani 
sn=Mourani 
mail=emourani@old.com 
description=Marketing relation. 
objectClass=top 
objectClass=person 

用下面的命令在LDAP中加入这一项: 

[root@deep]# ldapadd -f /tmp/newentry -D "cn=admin, o=openarch, c=com" -W 

Enter LDAP Password : 

上面的命令假定在配置文件中设置“rootdn”为“cn=admin, o=openarch, c=com”,“rootpw”设置为“secret”。命令还会提示输入口令。 

ldapmodify 
“ldapmodify”命令建立到LDAP服务器的连接,绑定、修改和加入数据项。通过使用“-f”参数可以设置从标准输入还是文件中得到数据项的信息。 

用于“ldapmodify”命令的输入文件的格式: 

假定“/tmp/entry”文件存在,而且文件的内容是: 

cn=Europe Mourani, o=openarch, c=com 
- mail=emourani@old.com # will delete the old mail address for Europe Mourani in the database. 
+mail=emourani@new.com # will add the new mail address for Europe Mourani in the database. 

用下面的命令改变LDAP中的数据项: 

[root@deep]# ladpmodify -D ‘cn=Admin, o=openarch, c=com’ -W -f 

这个命令改变了“Europe Mourani”数据项的mail属性,把这个属性值改为:emourani@new.com。 

OpenLDAP的用户工具 
下面列出的是一些我们经常要用到的命令,当然还有很多其它的命令,更详细的信息可以查看man帮助页或其它文档。 

搜索LDAP的数据项 
“ldapsearch”命令建立到LDAP服务器的连接、绑定并用过滤器进行搜索。 

用下面的命令搜索LDAP数据库中的数据项: 

[root@deep]# ldapsearch -b 
[root@deep]# ldapsearch -b ‘o=openarch.com’ ‘cn=a*’ 

这个命令把所有以字母“a”开头的数据项的信息显示在道标准输出上。 

安装到系统中的文件 
>; /etc/openldap 
>; /etc/openldap/ldap.conf 
>; /etc/openldap/ldap.conf.default 
>; /etc/openldap/ldapfilter.conf 
>; /etc/openldap/ldapfilter.conf.default 
>; /etc/openldap/ldaptemplates.conf 
>; /etc/openldap/ldaptemplates.conf.default 
>; /etc/openldap/ldapsearchprefs.conf 
>; /etc/openldap/ldapsearchprefs.conf.default 
>; /etc/openldap/slapd.conf 
>; /etc/openldap/slapd.conf.default 
>; /etc/openldap/slapd.at.conf 
>; /etc/openldap/slapd.at.conf.default 
>; /etc/openldap/slapd.oc.conf 
>; /etc/openldap/slapd.oc.conf.default 
>; /etc/openldap/ldapserver 
>; /etc/rc.d/init.d/ldap 
>; /etc/rc.d/rc0.d/K40ldap 
>; /etc/rc.d/rc1.d/K40ldap 
>; /etc/rc.d/rc2.d/K40ldap 
>; /etc/rc.d/rc3.d/S70ldap 
>; /etc/rc.d/rc4.d/S70ldap 
>; /etc/rc.d/rc5.d/S70ldap 
>; /etc/rc.d/rc6.d/K40ldap 
>; /usr/bin/ud 
>; /usr/bin/ldapsearch 
>; /usr/bin/ldapmodify 
>; /usr/bin/ldapdelete 
>; /usr/bin/ldapmodrdn 
>; /usr/bin/ldappasswd 
>; /usr/bin/ldapadd 
>; /usr/include/ldap.h 
>; /usr/include/lber.h 
>; /usr/include/ldap_cdefs.h 
>; /usr/man/man3/ldap_open.3 
>; /usr/man/man3/ldap_errlist.3 
>; /usr/man/man3/ldap_err2string.3 
>; /usr/man/man3/ldap_first_attribute.3 
>; /usr/man/man3/ldap_next_attribute.3 
>; /usr/man/man3/ldap_first_entry.3 
>; /usr/man/man3/ldap_next_entry.3 
>; /usr/man/man3/ldap_count_entries.3 
>; /usr/man/man3/ldap_friendly.3 
>; /usr/man/man3/ldap_friendly_name.3 
>; /usr/man/man3/ldap_free_friendlymap.3 
>; /usr/man/man3/ldap_get_dn.3 
>; /usr/man/man3/ldap_explode_dn.3 
>; /usr/man/man3/ldap_explode_dns.3 
>; /usr/man/man3/ldap_dn2ufn.3 
>; /usr/man/man3/ldap_is_dns_dn.3 
>; /usr/man/man3/ldap_get_values.3 
>; /usr/man/man3/ldap_get_values_len.3 
>; /usr/man/man3/ldap_value_free.3 
>; /usr/man/man3/ldap_value_free_len.3 
>; /usr/man/man3/ldap_count_values.3 
>; /usr/man/man3/ldap_count_values_len.3 
>; /usr/man/man3/ldap_getfilter.3 
>; /usr/man/man3/ldap_init_getfilter.3 
>; /usr/man/man3/ldap_init_getfilter_buf.3 
>; /usr/man/man3/ldap_getfilter_free.3 
>; /usr/man/man3/ldap_getfirstfilter.3 
>; /usr/man/man3/ldap_getnextfilter.3 
>; /usr/man/man3/ldap_setfilteraffixes.3 
>; /usr/man/man3/ldap_build_filter.3 
>; /usr/man/man3/ldap_modify.3 
>; /usr/man/man3/ldap_modify_s.3 
>; /usr/man/man3/ldap_mods_free.3 
>; /usr/man/man3/ldap_modrdn.3 
>; /usr/include/disptmpl.h 
>; /usr/include/srchpref.h 
>; /usr/lib/liblber.so.1.0.0 
>; /usr/lib/liblber.so.1 
>; /usr/lib/liblber.so 
>; /usr/lib/liblber.la 
>; /usr/lib/liblber.a 
>; /usr/lib/libldap.so.1.0.0 
>; /usr/lib/libldap.so.1 
>; /usr/lib/libldap.so 
>; /usr/lib/libldap.la 
>; /usr/lib/libldap.a 
>; /usr/man/man1/ud.1 
>; /usr/man/man1/ldapdelete.1 
>; /usr/man/man1/ldapmodify.1 
>; /usr/man/man1/ldapadd.1 
>; /usr/man/man1/ldapmodrdn.1 
>; /usr/man/man1/ldappasswd.1 
>; /usr/man/man1/ldapsearch.1 
>; /usr/man/man3/cldap_close.3 
>; /usr/man/man3/cldap_open.3 
>; /usr/man/man3/cldap_search_s.3 
>; /usr/man/man3/cldap_setretryinfo.3 
>; /usr/man/man3/lber-decode.3 
>; /usr/man/man3/lber-encode.3 
>; /usr/man/man3/ldap.3 
>; /usr/man/man3/cldap.3 
>; /usr/man/man3/ldap_abandon.3 
>; /usr/man/man3/ldap_add.3 
>; /usr/man/man3/ldap_add_s.3 
>; /usr/man/man3/ldap_bind.3 
>; /usr/man/man3/ldap_bind_s.3 
>; /usr/man/man3/ldap_simple_bind.3 
>; /usr/man/man3/ldap_simple_bind_s.3 
>; /usr/man/man3/ldap_kerberos_bind_s.3 
>; /usr/man/man3/ldap_kerberos_bind1.3 
>; /usr/man/man3/ldap_kerberos_bind1_s.3 
>; /usr/man/man3/ldap_kerberos_bind2.3 
>; /usr/man/man3/ldap_kerberos_bind2_s.3 
>; /usr/man/man3/ldap_unbind.3 
>; /usr/man/man3/ldap_unbind_s.3 
>; /usr/man/man3/ldap_set_rebind_proc.3 
>; /usr/man/man3/ldap_cache.3 
>; /usr/man/man3/ldap_enable_cache.3 
>; /usr/man/man3/ldap_disable_cache.3 
>; /usr/man/man3/ldap_destroy_cache.3 
>; /usr/man/man3/ldap_flush_cache.3 
>; /usr/man/man3/ldap_uncache_entry.3 
>; /usr/man/man3/ldap_uncache_request.3 
>; /usr/man/man3/ldap_set_cache_options.3 
>; /usr/man/man3/ldap_charset.3 
>; /usr/man/man3/ldap_set_string_translators.3 
>; /usr/man/man3/ldap_enable_translation.3 
>; /usr/man/man3/ldap_translate_from_t61.3 
>; /usr/man/man3/ldap_translate_to_t61.3 
>; /usr/man/man3/ldap_t61_to_8859.3 
>; /usr/man/man3/ldap_8859_to_t61.3 
>; /usr/man/man3/ldap_compare.3 
>; /usr/man/man3/ldap_compare_s.3 
>; /usr/man/man3/ldap_delete.3 
>; /usr/man/man3/ldap_delete_s.3 
>; /usr/man/man3/ldap_disptmpl.3 
>; /usr/man/man3/ldap_modrdn_s.3 
>; /usr/man/man3/ldap_modrdn2.3 
>; /usr/man/man3/ldap_modrdn2_s.3 
>; /usr/man/man3/ldap_init.3 
>; /usr/man/man3/ldap_result.3 
>; /usr/man/man3/ldap_msgfree.3 
>; /usr/man/man3/ldap_search.3 
>; /usr/man/man3/ldap_search_s.3 
>; /usr/man/man3/ldap_search_st.3 
>; /usr/man/man3/ldap_searchprefs.3 
>; /usr/man/man3/ldap_init_searchprefs.3 
>; /usr/man/man3/ldap_init_searchprefs_buf.3 
>; /usr/man/man3/ldap_free_searchprefs.3 
>; /usr/man/man3/ldap_first_searchobj.3 
>; /usr/man/man3/ldap_next_searchobj.3 
>; /usr/man/man3/ldap_sort.3 
>; /usr/man/man3/ldap_sort_entries.3 
>; /usr/man/man3/ldap_sort_values.3 
>; /usr/man/man3/ldap_sort_strcasecmp.3 
>; /usr/man/man3/ldap_ufn.3 
>; /usr/man/man3/ldap_ufn_search_s.3 
>; /usr/man/man3/ldap_ufn_search_c.3 
>; /usr/man/man3/ldap_ufn_search_ct.3 
>; /usr/man/man3/ldap_ufn_setprefix.3 
>; /usr/man/man3/ldap_ufn_setfilter.3 
>; /usr/man/man3/ldap_ufn_timeout.3 
>; /usr/man/man3/ldap_url.3 
>; /usr/man/man3/ldap_is_ldap_url.3 
>; /usr/man/man3/ldap_url_parse.3 
>; /usr/man/man3/ldap_free_urldesc.3 
>; /usr/man/man3/ldap_url_search.3 
>; /usr/man/man3/ldap_url_search_s.3 
>; /usr/man/man3/ldap_url_search_st.3 
>; /usr/man/man5/ldap.conf.5 
>; /usr/man/man5/ldapfilter.conf.5 
>; /usr/man/man5/ldapfriendly.5 
>; /usr/man/man5/ldapsearchprefs.conf.5 
>; /usr/man/man5/ldaptemplates.conf.5 
>; /usr/man/man5/ldif.5 
>; /usr/man/man5/slapd.conf.5 
>; /usr/man/man5/slapd.replog.5 
>; /usr/man/man5/ud.conf.5 
>; /usr/man/man8/centipede.8 
>; /usr/man/man8/chlog2replog.8 
>; /usr/man/man8/edb2ldif.8 
>; /usr/man/man8/go500.8 
>; /usr/man/man8/go500gw.8 
>; /usr/man/man8/in.xfingerd.8 
>; /usr/man/man8/ldapd.8 
>; /usr/man/man8/ldbmcat.8 
>; /usr/man/man8/ldif.8 
>; /usr/man/man8/ldif2ldbm.8 
>; /usr/man/man8/ldif2index.8 
>; /usr/man/man8/ldif2id2entry.8 
>; /usr/man/man8/ldif2id2children.8 
>; /usr/man/man8/mail500.8 
>; /usr/man/man8/fax500.8 
>; /usr/man/man8/rcpt500.8 
>; /usr/man/man8/slapd.8 
>; /usr/man/man8/slurpd.8 
>; /usr/sbin/ldif 
>; /usr/sbin/in.xfingerd 
>; /usr/man/man3/ldap_init_templates.3 
>; /usr/man/man3/ldap_init_templates_buf.3 
>; /usr/man/man3/ldap_free_templates.3 
>; /usr/man/man3/ldap_first_disptmpl.3 
>; /usr/man/man3/ldap_next_disptmpl.3 
>; /usr/man/man3/ldap_oc2template.3 
>; /usr/man/man3/ldap_tmplattrs.3 
>; /usr/man/man3/ldap_first_tmplrow.3 
>; /usr/man/man3/ldap_next_tmplrow.3 
>; /usr/man/man3/ldap_first_tmplcol.3 
>; /usr/man/man3/ldap_next_tmplcol.3 
>; /usr/man/man3/ldap_entry2text.3 
>; /usr/man/man3/ldap_entry2text_search.3 
>; /usr/man/man3/ldap_vals2text.3 
>; /usr/man/man3/ldap_entry2html.3 
>; /usr/man/man3/ldap_entry2html_search.3 
>; /usr/man/man3/ldap_vals2html.3 
>; /usr/man/man3/ldap_error.3 
>; /usr/man/man3/ldap_perror.3 
>; /usr/man/man3/ld_errno.3 
>; /usr/man/man3/ldap_result2error.3 
>; /usr/sbin/go500 
>; /usr/sbin/go500gw 
>; /usr/sbin/mail500 
>; /usr/sbin/rp500 
>; /usr/sbin/fax500 
>; /usr/sbin/xrpcomp 
>; /usr/sbin/rcpt500 
>; /usr/sbin/slapd 
>; /usr/sbin/ldif2ldbm 
>; /usr/sbin/ldif2index 
>; /usr/sbin/ldif2id2entry 
>; /usr/sbin/ldif2id2children 
>; /usr/sbin/ldbmcat 
>; /usr/sbin/centipede 
>; /usr/sbin/ldbmtest 

具体启动脚本时会遇到sladpd进程启动不了的问题,建议用如下方法启动:
#su root -c /usr/local/libexec/slapd -f myslapd.conf 
其中slapd被安装在配置文件指定的"libexecdir"目录下,通常为/usr/local/libexec/slpad。 
如果启动成功,到同一网络中的一台pc上运行outlook,添加ldap目录服务,然后搜索个人,应该能返回提示"没有符合所搜索项目"之类的提示,说明已经连接到ldap服务器.

但我在用ldapadd添加邮件用户时提示如下错误,请高手指点
#ldapadd -D &quot;cn=manager,dc=openarch,dc=com&quot; -W < mydif.ldif
Enter LDAP Password: 
ldap_sasl_interactive_bind_s: No such attribute

原创粉丝点击