openldap的配置手册(转)

openldap的配置手册(转)[@more@]

最近一直在安装opneldap-2.0.25,现在终于搞定了,所以拿来和大家分享一下,如果有什么意见,可以共同讨论一下:

1) 一般需要安装以下四个rpm包:

openldap-2.0.25-1.i386.rpm

openldap-servers-2.0.25-1.i386.rpm

openldap-clients-2.0.25-1.i386.rpm

openldap-devel -2.0.25-1.i386.rpm

Openldap-2.0*是必要套件,一定要先安装;Openldap-servers*是服务器套件;openldap-clients*是操作程序套件;openldap-devel*是开发工具套件.

如果需要用ldap做一些高级应用,还需要加装如下套件:

auth_ldap*

nss_ldap*

php_ldap*

2)下一步就是配置了

配置文件一般在/etc/openldap/下:

ldapfilter.conf ldap.conf

ldapsearchprefs.conf schema ldaptemplates.conf slapd.conf

文件slapd.conf是设置ldap服务器连接,进入文件,修改相应的部分:

在include /etc/openldap/schema/……

部分添加完整的方案,即schema目录下的所有方案。

在“ldbm database definitions”部分,用suffix命令设置ldap服务器的基础搜索路径(BDN):

suffix “dc=buct, dc=edu.cn”

rootdn “cn=root, dc=buct, dc=edu.cn”

rootpw 123456

其它大多数的缺省设置都是适当的。

然后检查两个文件,以保证可以在同一台机器上实现服务器与客户端同机操作:

/etc/hosts :

127.0.0.1 localhost.localdomain localhost

202.xxx.xxx.xxx buct.edu.cn

/etc/openldap/ldap.conf:

HOST 202.4.155.91

BASE dc=buct , dc=edu.cn

3)测试服务器:

#service ldap start

#ldapsearch –x –b ‘’ -s base ‘(objectclass=*)’

namingContexts

如果正确配置了,应该出现下面输出:

version :2

#filter(objectclass=*)

#requesting: namingContexts

dn:

namingContexts: dc=buct, dc=edu.cn

#search result

search :2

result :0 success

# numResponses: 2

# numEntries: 1

如果出现错误消息,则返回并检查配置。

4)最后一步是设置一些基本的访问控制,Redhat 将ACL添加到slapd.conf文件里:

#define ACLs ……access control definitions

access to dn=“.* , dc=buct, dc=edu.cn” attr=password

by dn=“cn=root, dc=buct, dc=edu.cn” write

by self write

by * read

access to dn=“.* , dc=buct, dc=edu.cn”

by * read

最后在重起一下ldap服务器,就ok了

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/8225414/viewspace-940595/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/8225414/viewspace-940595/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值