Linux中国 Linux中国门户站!
设为主页 设为主页
收藏本站 收藏本站
 
当前位置 :首页 ->Linux技术 ->Linux安全 ->正文

基于Linux操作系统的目录服务的实现(2)

来源:linux.chinaunix.net 作者:chinaitlab  时间:2007-04-22 点击: [收藏] [投稿]

  对这个配置文件的关键修改是对suffix后缀为本地的组织形式,可以按照域名的形式,也可以按照组织模式。其中的rootdn定义了本地目录树的根,rootpw即是相对于本目录树的管理员口令,缺省是使用的明文为“secret”。其中的replica 指定备份目录服务器的地址,如果是备份服务器则不需要replica配置项,而是添加udpatedn=主目录服务器的地址,同时指定referral为主目录服务器。同时,缺省的目录数据是以ldbm形式(Linux中实际gdbm格式)存放在/usr/tmp目录中。Access定义了对目录信息的访问信息,它是基于条目的,即用户自己可以通过输入自己的口令修改自己的数据,其口令存放在自己的口令域(userpassword)中。

  ldap.conf是本地系统LDAP客户的缺省配置,启动slapd后可以使用客户端软件使用ldap.conf的信息作为缺省信息。根据我们的具体情况,将其修改为如下形式:

    BASE O=mccc,C=US

    HOST sunshine.mccc.net

  3.生成目录数据

  生成数据文件的方法:

  编辑LDIF文件

  LDIF文件是文本文件的形式,例如为Windows的消息簿提供一个目录格式可为如下形式:

    dn: o=mccc,c=US

    o: mccc

    objectclass: organization

    dn: cn=test,o=mccc,c=US

    cn: test

    cn: 测试中文

    mail: testmail@mccc.net

    othermailbox: testmailother@mccc.com

    givenname: givenname

    sn: test sn

    surname: surname

    st: st

    c: china

    co: co

    o: mccc

    ou: ou

    url: sunshine.mccc.net

    homephone: homephone

    homepostaladdress: homepostaladdress

    facsimiletelephonenumber: facsimiletelephonenumber

    otherfacsimiletelephonenumber: otherfacsimiletelephonenumber

    officefax: officefax

    mobile: mobile

    otherpager: otherpager

    officepager: officepager

    pager: pager

    info: info

    title: title

    telephonenumber: telephonenumber

    l: location

    postaladdress: postaladdress

    streetaddress: streetaddress

    department: department

    comment: comment

    postalcode: postalcode

    physicaldeliveryofficename: physicaldeliveryofficename

    initials: initials

    conferenceinformation: conferenceinformation

    labeleduri: labeleduri

    manager: manager

    reports: reports

    objectclass: organization

  其中的:后面的值中均可以填写中文信息,使用上述格式主要是为了方便在Windows 消息簿中对照用户的信息。



 如果您对本文有任何疑问或者建议,请到讨论区发表您的意见: >> 论坛入口 <<



上一篇:Linux日志管理的技巧   下一篇:基于Linux操作系统的目录服务的实现(1)

文章评论】 【收藏本文】 【推荐好友】 【打印本文】 【我要投稿】 【论坛讨论
更多相关文章
Power by linux-cn.com 粤ICP备05006655号