openldap同步 syncrepl

ldap同步linux

環境 :redhat 6.0 64位session

selinux關閉,iptables刷掉ide

服務端spa

/etc/init.d/slapd stop                             確保服務端和客戶端slapd服務所有中止ip

vi /etc/openldap/slapd.conf同步

 

moduleload syncprov.la 添加模塊                模塊路徑位/usr/lib64/openldap   64位系統it

#######################################################################
# ldbm and/or bdb database definitions
#######################################################################
io

database    bdb
suffix        "dc=westos.org"
checkpoint    1024 15
rootdn        "cn=Manager,dc=westos.org"
rootpw        westos
overlay syncprov                                          
syncprov-checkpoint 100 10
syncprov-sessionlog 100
table

access to *
        by dn.exact="cn=Manager,dc=westos.org" read
        by * none
class

scp /var/lib/ldap/* 192.168.0.10:/var/lib/ldap/  拷貝文件到客戶端,在客戶端要修改拷貝文件的所屬人和所屬組位ldap

客戶端

 

 

啓動服務端slapd服務,而後啓動客戶端slapd服務,完成,刪除服務端的用戶端,客戶端也會同步到,完成!

 

vi /etc/openldap/slapd.conf

database    bdb
suffix        "dc=westos.org"
checkpoint    1024 15
rootdn        "cn=Manager,dc=westos.rog"
rootpw        westos


syncrepl rid=001
    provider=ldap://192.168.0.100:389
    type=refreshOnly
    searchbase="dc=westos.org"
    attrs=*
    schemachecking=off
    bindmethod=simple
    binddn="cn=Manager,dc=westos.org"
    credentials="westos"
    retry="60 +"
access to *         by dn.exact="cn=Manager,dc=westos.org" read         by * none

相關文章
相關標籤/搜索