分类: LINUX
2011-01-28 01:32:30
系统环境: Centos 4.3
所需软件
openldap-2.2.13-4
openldap-servers-2.2.13-4
openldap-devel-2.2.13-4
openldap-clients-2.2.13-4
slapd.conf 是ldap 服务器最主要的一个配置文件
查看文件内除了以#开头的行, 以及空行
grep -v -E '^#|^$' slapd.conf
include /etc/openldap/schema/core.schema
include /etc/openldap/schema/cosine.schema
include /etc/openldap/schema/inetorgperson.schema
include /etc/openldap/schema/nis.schema
allow bind_v2
pidfile /var/run/slapd.pid
argsfile /var/run/slapd.args
access to attrs=shadowLastChange,userPassword
by self write
by * auth
access to *
by * read
database bdb
suffix "dc=prosten,dc=com,dc=cn"
rootdn "cn=Manager,dc=prosten,dc=com,dc=cn"
rootpw {SSHA}MMT9ixbYvyiQsaBGWiN45ZW7atCqs8nj
directory /var/lib/ldap
index objectClass eq,pres
index ou,cn,mail,surname,givenname eq,pres,sub
index uidNumber,gidNumber,loginShell eq,pres
index uid,memberUid eq,pres,sub
index nisMapName,nisMapEntry eq,pres,sub
grep -v -E '^#|^$' ldap.conf
HOST 127.0.0.1
BASE dc=prosten,dc=com,dc=cn
TLS_CACERTDIR /etc/openldap/cacerts
service ldap restart
Stopping slapd: [ OK ]
Checking configuration files for slapd: config file testing succeeded
Starting slapd:
建立base.ldif,类似这样
dn: dc=prosten,dc=com,dc=cn
dc: prosten
objectClass: top
objectClass: domain
dn: ou=humen,dc=prosten,dc=com,dc=cn
ou: humen
objectClass: top
objectClass: organizationalUnit
dn: ou=group,dc=prosten,dc=com,dc=cn
ou: group
objectClass: top
objectClass: organizationalUnit
dn: cn=om,ou=group,dc=prosten,dc=com,dc=cn
cn: om
objectClass: posixGroup
gidNumber: 1000
dn: cn=mis,ou=group,dc=prosten,dc=com,dc=cn
cn: mis
objectClass: posixGroup
gidNumber: 1001
prosten.com.cn