导入schema到openLdap

1 本地创建baseObj.schema

2 通过ftp上传到ldap服务器,路径/etc/openldap/schema

3 创建conver.conf文件,内容如下:

include /etc/openldap/schema/core.schema
include /etc/openldap/schema/collective.schema
include /etc/openldap/schema/corba.schema
include /etc/openldap/schema/cosine.schema
include /etc/openldap/schema/duaconf.schema
include /etc/openldap/schema/dyngroup.schema
include /etc/openldap/schema/inetorgperson.schema
include /etc/openldap/schema/java.schema
include /etc/openldap/schema/misc.schema
include /etc/openldap/schema/nis.schema
include /etc/openldap/schema/openldap.schema
include /etc/openldap/schema/ppolicy.schema
include /etc/openldap/schema/baseObj.schema

注意:文件末尾要加上本地定义的文件include /etc/openldap/schema/baseObj.schema

         把文件放在/tmp下

 

4 进入/tmp目录

  #mkdir schema            (创建文件夹)

  #slaptest -f /tmp/convert.conf -F /tmp/schema  (生成ldap信息文件)

 

5 执行拷贝命令:

  # cp /tmp/schema/cn\=config/cn\=schema/cn\=\{12\}baseObj.ldif ./slapd.d/cn\=config/cn\=schema/

6 进入cn=schema路径 :#ls -l (查看权限)

   授权: #chown ldap:ldap cn\=\{12}baseObj.ldif

 

7 启动服务: #service slapd start

 

8 连接ldap服务,用户名和密码 可以查看/etc/openldap/slapd.d/cn=config/olcDatabase={0}config.ldif文件中的olcAccess:的值

  

你可能感兴趣的:(openLdap)