[Date Prev][Date Next] [Chronological] [Thread] [Top]

RE: replication setup



Hi
 
  Ok now my replication is working, because if I make change on Master as under
[root@pcNavYkfSupp1 root]# smbldap-usermod.pl  -c "Sys Admin"  adm (this is my slave server and smblda-usermod,pl is setup to talk to only my master it doesn't know a thing about Slave, even though it runs on slave)
 
I see my change implemented on both Master and server, which makes me think that my replication is working, but what bothers me is no info is being logged in slurpd.log file
 
This is my Master config for replication
 
replica host=pcNavYkfSupp1.navtechinc.com:389
        binddn="cn=Manager,dc=navtechinc,dc=com"
        bindmethod=simple credentials='secret'
#        tls=yes
replogfile  /var/log/slurpd.log
 
This is my slave sonfig
updatedn "cn=Manager,dc=navtechinc,dc=com"
updateref "ldap://pcNavYkfSupp2.navtechinc.com"
I also looked at /var/log/messages to see if slurpd is writting there, but Nada.
the only thing I have changed in master slapd.config is file name I changed it to be slurpd.log, rather than replog.
 
So any idea, to help me out here
 
Thanks

Jason Tey <jason.tey@pivod.com> wrote:

Jawed,

 

A small crash course on replication with LDAP.

The replogfile directive, tells ?slapd? where to write replication info when replicate data is changed.

?slurpd? polls this file (in your case /var/log/slurpd.log) and when there are changes to this file, slurpd writes the changes to the slave LDAP directory.

 

I strongly suggest that you use separate accounts for masters and slaves. I use ?person? objects for my accounts.

 

IN THE MASTERSLAPD.conf

Give the person object access to the root, e.g.

 

access to *

      by dn="cn=yourMaster,dc=dn of Wherever the account is" write

      by * read

 

Then you?ll have the replica host as you do below:

IN your database definition:

 

Database    bdb

Suffix      ?whatever suffix?

 

replogfile /var/log/slurpd.log

 

replica host= pcNavYkfSupp1.navtechinc.com:389
      binddn="cn=yourMaster,dc=dn of Wherever the account is"

      bindmethod=simple

      credentials=secret

You shouldn?t need apostrophes (?) on the password

 

 

 

 

In you slave slapdSlave.conf you only need the updateref and updatedn directives and the access directive I wrote above..

e.g.

access to *

      by dn="cn=yourMaster,dc=dn of Wherever the account is" write

      by * read

 

IN your database definition:

 

Database    bdb

Suffix      ?whatever suffix (same as master)?

 

updatedn "cn=yourMaster,dc=dn of Wherever the account is"

updateref "ldap://pcNavYkfSupp2.navtechinc.com"

 

THAT, is pretty much all there is to Master/Slave replication?

Do That, and you?ll be laughing mate.

 

Jason.

 

Perth WA, Australia.

 

 

Hello

 

 I am trying to setup replication stuff, and yes I admit I really don't understand replication well, so please help me out

 

here is my setup

 

Master slapd.conf

replogfile  /var/log/slurpd.log
syslog-level 4
replica host=pcNavYkfSupp1.navtechinc.com:389
        binddn=Manager,dc=navtechinc,dc=com
        bindmethod=simple credentials='secret'
#        tls=yes

 

Slave ldap

 

# Replicas to which we should propagate changes
#replica host=ldap-1.example.com:389 tls=yes
#       bindmethod=sasl saslmech=GSSAPI
#       authcId=host/ldap-master.example.com@EXAMPLE.COM
updatedn "cn=Manager,dc=navtechinc,dc=com"
updateref "ldap://pcNavYkfSupp2.navtechinc.com"

 

I put binddn and updatedn as Manager as I was not sure if I realy need another dn in ldap database to auth.

 

Strange thing slurpd is not creating any loginfo in the log file I told it to do in slapd.conf.

it created /var/lib/ldap/replic dir and there are 2 files on is status file other is lock file.

I can only run it as root as

usage: slurpd   [-d debug-level] [-s syslog-level]
                [-f slapd-config-file] [-r replication-log-file]
                [-t tmp-dir] [-o]

All those file and replic dir are owned by root.

On slave I even don't see slurpd connecting to ldap on slave

 

Please give me some hint

Thanks

 

 


Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software