歡迎您光臨本站 註冊首頁

求助:關於ldap主從同步問題?

←手機掃碼閱讀     火星人 @ 2014-03-04 , reply:0

求助:關於ldap主從同步問題?

在做ldap主從同步時能實現兩台ldap整個條目同步
現在要做其中一個子條目同步

rootdn:        dc=example, dc=com
如果要實現  dn: cn=MetaDataDir,ou=NMDS,dc=example,dc=com這個子條目下的同步該如何修改主從伺服器上的slapd.conf文件啊?

附ldap整個條目同步的主從伺服器上的slapd.conf配置代碼:
1、slapd_master.conf
# $OpenLDAP: pkg/ldap/servers/slapd/slapd.conf,v 1.8.8.4 2000/08/26 17:06:18 kurt Exp $
#
# See slapd.conf(5) for details on configuration options.
# This file should NOT be world readable.
#
include                /usr/local/etc/openldap/schema/core.schema
include                /usr/local/etc/openldap/schema/mdsLDAP.schema
#include        /usr/local/etc/openldap/schema/lustre.schema
#include        /usr/local/etc/openldap/schema/myTestDir.schema
#include        /usr/local/etc/openldap/schema/myTestDir2.schema

# Define global ACLs to disable default read access.

# Do not enable referrals until AFTER you have a working directory
# service AND an understanding of referrals.
#referral        ldap://root.openldap.org

pidfile                /usr/local/var/slapd.pid
argsfile        /usr/local/var/slapd.args
replogfile      /usr/local/var/openldap-slurp/replica/ldap.replog         #add for synchronization
# Load dynamic backend modules:
# modulepath        /usr/local/libexec/openldap
# moduleload        back_ldap.la
# moduleload        back_ldbm.la
# moduleload        back_passwd.la
# moduleload        back_shell.la

#######################################################################
# ldbm database definitions
#######################################################################

database        ldbm
suffix                "dc=example, dc=com"
#suffix                "o=My Organization Name, c=US"
rootdn                "cn=Manager, dc=example, dc=com"
#rootdn                "cn=Manager, o=My Organization Name, c=US"
# Cleartext passwords, especially for the rootdn, should
# be avoid.  See slappasswd(8) and slapd.conf(5) for details.
# Use of strong authentication encouraged.
rootpw                hustldap
sizelimit       65535
# The database directory MUST exist prior to running slapd AND
# should only be accessable by the slapd/tools. Mode 700 recommended.
directory        /usr/local/var/openldap-ldbm
cachesize 100000
dbcachesize 10000000
dbnolocking
dbnosync
#add for synchronization
replica host=192.168.83.1:389
suffix="cn=MetaDataDir,ou=NMDS,dc=example,dc=com"
binddn="cn=Manager,dc=example,dc=com"
bindmethod=simple
credentials=hustldap
# Indices to maintain
index        objectClass        eq
index   default pres,eq
index   uid
index   cn,sn pres,eq,su

2、slapd_slave.conf
# $OpenLDAP: pkg/ldap/servers/slapd/slapd.conf,v 1.8.8.4 2000/08/26 17:06:18 kurt Exp $
#
# See slapd.conf(5) for details on configuration options.
# This file should NOT be world readable.
#
include                /usr/local/etc/openldap/schema/core.schema
include                /usr/local/etc/openldap/schema/mdsLDAP.schema
#include        /usr/local/etc/openldap/schema/lustre.schema
#include        /usr/local/etc/openldap/schema/myTestDir.schema
#include        /usr/local/etc/openldap/schema/myTestDir2.schema

# Define global ACLs to disable default read access.

# Do not enable referrals until AFTER you have a working directory
# service AND an understanding of referrals.
#referral        ldap://root.openldap.org

pidfile                /usr/local/var/slapd.pid
argsfile        /usr/local/var/slapd.args
access  to      *
        by      *       write
# Load dynamic backend modules:
# modulepath        /usr/local/libexec/openldap
# moduleload        back_ldap.la
# moduleload        back_ldbm.la
# moduleload        back_passwd.la
# moduleload        back_shell.la

#######################################################################
# ldbm database definitions
#######################################################################

database        ldbm
updatedn        "cn=Manager,dc=example,dc=com"
updateref       ldap://192.168.83.6:389
suffix                "dc=example, dc=com"
#suffix                "o=My Organization Name, c=US"
rootdn                "cn=Manager, dc=example, dc=com"
#rootdn                "cn=Manager, o=My Organization Name, c=US"
# Cleartext passwords, especially for the rootdn, should
# be avoid.  See slappasswd(8) and slapd.conf(5) for details.
# Use of strong authentication encouraged.
rootpw                hustldap
sizelimit       65535
# The database directory MUST exist prior to running slapd AND
# should only be accessable by the slapd/tools. Mode 700 recommended.
directory        /usr/local/var/openldap-ldbm
cachesize 100000
dbcachesize 10000000
dbnolocking
dbnosync
# Indices to maintain
index        objectClass        eq
index   default pres,eq
index   uid
index   cn,sn pres,eq,sub
《解決方案》

高手來幫幫我啊!!!
《解決方案》

我在master的slapd.conf文件中加了suffix這條
如下:
#add for synchronization
replica host=192.168.83.1:389      
suffix=cn=MetaDataDir,ou=NMDS,dc=example,dc=com      
binddn="cn=Manager,dc=example,dc=com"      
bindmethod=simple            
credentials=hustlda      

但運行時修改主ldap伺服器上其他條目下的數據時從伺服器一樣同步了
但我只想要cn=MetaDataDir,ou=NMDS,dc=example,dc=com 這個條目下的數據同步啊
是什麼原因啊?是不是哪裡寫錯了?
高手來幫忙看看啊
謝謝了!!!!!!!!!!!!!!!

[火星人 ] 求助:關於ldap主從同步問題?已經有693次圍觀

http://coctec.com/docs/service/show-post-36559.html