OpenLDAP基础安装配置

转自:http://blog.sina.com.cn/s/blog_472b9eb20100ni0m.html

include         /usr/local/openldap/etc/openldap/schema/core.schema
include         /usr/local/openldap/etc/openldap/schema/corba.schema
include         /usr/local/openldap/etc/openldap/schema/cosine.schema
include         /usr/local/openldap/etc/openldap/schema/inetorgperson.schema
include         /usr/local/openldap/etc/openldap/schema/misc.schema
include         /usr/local/openldap/etc/openldap/schema/openldap.schema
include         /usr/local/openldap/etc/openldap/schema/nis.schema
include         /usr/local/openldap/etc/openldap/schema/samba.schema

引入schema文件的顺序如上。

然后是修改BaseDN和密码策略,然后init一个目录

dn: dc=ultra,dc=com
objectClass: top
objectClass: domain
objectClass: dcObject
dc: ultra
o: ultra.com
description:  ultra.com ldap

dn: ou=users,dc=ultra,dc=com
ou: users
objectClass: organizationalUnit

dn: ou=groups,dc=ultra,dc=com
ou: groups
objectClass: organizationalUnit

dn: ou=apps,dc=ultra,dc=com
ou: apps
objectClass: organizationalUnit

dn: uid=test,ou=users,dc=ultra,dc=com
cn: test
objectClass: top
objectClass: person
objectClass: organizationalPerson
objectClass: inetorgperson
objectClass: uidObject
sn: test
uid: test
userpassword: ao3qoq
mail: [email protected]
telephoneNumber: 371-6338-3522

dn: uid=Tom Black,ou=users,dc=ultra,dc=com
cn: Tom Black
objectClass: top
objectClass: person
objectClass: organizationalPerson
objectClass: inetorgperson
objectClass: uidObject
sn: Tom Black
uid: Tom Black
mail: [email protected]
telephoneNumber: 371-6338-3522

dn: uid=Jerry Smith,ou=users,dc=ultra,dc=com
cn: Jerry Smith
objectClass: top
objectClass: person
objectClass: organizationalPerson
objectClass: inetorgperson
objectClass: uidObject
sn: Smith
uid: Jerry Smith
mail: [email protected]
telephoneNumber: 371-6338-3521

dn: cn=ultraadmins,ou=groups,dc=ultra,dc=com
objectclass: groupOfUniqueNames
objectclass: top
cn: ultraadmins
uniquemember: uid=test,ou=users,dc=ultra,dc=com
uniquemember: uid=Tom Black,ou=users,dc=ultra,dc=com
uniquemember: uid=Jerry Smith,ou=users,dc=ultra,dc=com

dn: cn=poweradmins,ou=groups,dc=ultra,dc=com
objectclass: groupOfUniqueNames
objectclass: top
cn: poweradmins
uniquemember: uid=test,ou=users,dc=ultra,dc=com
uniquemember: uid=Tom Black,ou=users,dc=ultra,dc=com

dn: cn=thirdadmins,ou=groups,dc=ultra,dc=com
objectclass: groupOfUniqueNames
objectclass: top
cn: thirdadmins
uniquemember: uid=test,ou=users,dc=ultra,dc=com
uniquemember: uid=Tom Black,ou=users,dc=ultra,dc=com

 

你可能感兴趣的:(openldap)