rhel6 openldap syncrepl

on server
include        /etc/openldap/schema/corba.schema
include        /etc/openldap/schema/core.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/collective.schema
allow bind_v2
pidfile        /var/run/openldap/slapd.pid
argsfile    /var/run/openldap/slapd.args

# Load dynamic backend modules:
moduleload syncprov.la

#######################################################################
# ldbm and/or bdb database definitions
#######################################################################
database    bdb
suffix        "dc=linuxcbt,dc=com"
checkpoint    1024 15
rootdn        "cn=Manager,dc=linuxcbt,dc=com"
rootpw        westos
overlay syncprov
syncprov-checkpoint 100 10
syncprov-sessionlog 100
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

database monitor
access to *
        by dn.exact="cn=Manager,dc=my-domain,dc=com" read
        by * none

on client
include        /etc/openldap/schema/corba.schema
include        /etc/openldap/schema/core.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/collective.schema
allow bind_v2
pidfile        /var/run/openldap/slapd.pid
argsfile    /var/run/openldap/slapd.args

#######################################################################
# ldbm and/or bdb database definitions
#######################################################################
database    bdb
suffix        "dc=linuxcbt,dc=com"
checkpoint    1024 15
rootdn        "cn=Manager,dc=linuxcbt,dc=com"
rootpw        westos
directory    /var/lib/ldap
index objectclass,entryCSN,entryUUID eq
syncrepl rid=001
    provider=ldap://192.168.0.58:389
    type=refreshOnly
    searchbase="dc=linuxcbt,dc=com"
    attrs=*
    schemachecking=off
    bindmethod=simple
    binddn="cn=Manager,dc=linuxcbt,dc=com"
    credentials="westos"
    retry="60 +"
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

database monitor
access to *
        by dn.exact="cn=Manager,dc=my-domain,dc=com" read
        by * none

注意:配置文件/etc/openldap/slapd.conf里的内容是分块的,不能简单的全写到最后面

你可能感兴趣的:(职场,openLdap,休闲,syncrepl)