You are not logged in.

#1 2008-10-01 08:10:40

Gruntz
Member
From: Haskovo, Bulgaria
Registered: 2007-08-31
Posts: 291

OpenLDAP, replication.

Hi

I have two openldap servers. I am trying to get the master one to replicate. Here are my slapd.conf files:

Master slapd.conf

# This is the main slapd configuration file. See slapd.conf(5) for more
# info on the configuration options.

#######################################################################
# Global Directives:

# Features to permit
allow bind_v2

#######################################################################
#
# Schema and objectClass definitions
#
include         /etc/ldap/schema/core.schema
include         /etc/ldap/schema/cosine.schema
include         /etc/ldap/schema/inetorgperson.schema
include         /etc/ldap/schema/nis.schema
include        /etc/ldap/schema/misc.schema
include        /etc/ldap/schema/openldap.schema
include         /etc/ldap/schema/samba.schema

#######################################################################
# Where the pid file is put. The init.d script
# will not stop the server if you change this.
pidfile         /var/run/slapd/slapd.pid

# List of arguments that were passed to the server
argsfile        /var/run/slapd/slapd.args

# Read slapd.conf(5) for possible values
loglevel        296

# Where the dynamically loaded modules are stored
modulepath    /usr/lib/ldap
moduleload    back_bdb

# The maximum number of entries that is returned for a search operation
sizelimit 500

# The tool-threads parameter sets the actual amount of cpu's that is used
# for indexing.
tool-threads 1

#######################################################################
# Specific Backend Directives for bdb:
# Backend specific directives apply to this backend until another
# 'backend' directive occurs
backend        bdb
checkpoint 512 30

#######################################################################
# Specific Backend Directives for 'other':
# Backend specific directives apply to this backend until another
# 'backend' directive occurs
#backend        <other>

#######################################################################
#
# SASL/TLS Stuff
#
#TLSCipherSuite HIGH:MEDIUM:+SSLv2
#TLSCACertificateFile /etc/ldap/certs/server.pem
#TLSCertificateFile /etc/ldap/certs/server.pem
#TLSCertificateKeyFile /etc/ldap/certs/server.pem

#######################################################################
# Specific Directives for database #1, of type bdb:
# Database specific directives apply to this databasse until another
# 'database' directive occurs
database        bdb
suffix          "dc=sepbulgaria"
rootdn          "cn=admin,dc=sepbulgaria"
rootpw        {SSHA}y6n7Ar4OOOJHiKkEhWXO/5FDdt0j3EPt
#password-hash   {SSHA}
# Where the database file are physically stored for database #1
directory       "/var/lib/ldap"

# For the Debian package we use 2MB as default but be sure to update this
# value if you have plenty of RAM
dbconfig set_cachesize 0 2097152 0
cachesize       10000

# Sven Hartge reported that he had to set this value incredibly high
# to get slapd running at all. See http://bugs.debian.org/303057
# for more information.

# Number of objects that can be locked at the same time.
#dbconfig set_lk_max_objects 1500
# Number of locks (both requested and granted)
#dbconfig set_lk_max_locks 1500
# Number of lockers
#dbconfig set_lk_max_lockers 1500

# Save the time that the entry gets modified, for database #1
lastmod         on

###############################################################################
#
# Indices to maintain
#
index    objectClass    eq
#index    cn        eq,sub
#index    sn        pres,sub,eq
#index    uid        pres,sub,eq
#index    displayName    pres,sub,eq
#index    uidNumber    eq
#index    gidNumber    eq

###############################################################################
#
# Access control
#
# The userPassword by default can be changed
# by the entry owning it if they are authenticated.
# Others should not be able to see it, except the
# admin entry below
# These access lines apply to database #1 only
#access to attrs=userPassword,shadowLastChange
#        by dn="cn=admin,dc=sepbulgaria" write
#        by anonymous auth
#        by self write
#        by * none

# Ensure read access to the base for things like
# supportedSASLMechanisms.  Without this you may
# have problems with SASL not knowing what
# mechanisms are available and the like.
# Note that this is covered by the 'access to *'
# ACL below too but if you change that as people
# are wont to do you'll still need this if you
# want SASL (and possible other things) to work 
# happily.
#access to dn.base="" by * read

# The admin dn has full write access, everyone else
# can read everything.

access to *
        by dn="cn=admin,dc=sepbulgaria" write
        by * read

access to attrs=userPassword,sambaLMPassword,sambaNTPassword
        by dn="cn=admin,dc=sepbulgaria" write
    by anonymous auth
    by self write
        by * write

# For Netscape Roaming support, each user gets a roaming
# profile for which they have write access to
#access to dn=".*,ou=Roaming,o=morsnet"
#        by dn="cn=admin,dc=localdomain" write
#        by dnattr=owner write

###############################################################################
#
# Replication Server
#
replogfile /etc/ldap/replog/slurpd.replog
replica uri=ldap://192.168.206.131:389
    binddn="cn=admin,dc=sepbulgaria"
    bindmethod=simple
    credentials={SSHA}y6n7Ar4OOOJHiKkEhWXO/5FDdt0j3EPt
    #tls=no

#   replica host=slave2.example.com
#          binddn="cn=Replicator, dc=example, dc=com"
#          bindmethod=simple credentials=secret

Slave slapd.conf

# This is the main slapd configuration file. See slapd.conf(5) for more
# info on the configuration options.

#######################################################################
# Global Directives:

# Features to permit
allow bind_v2

#######################################################################
#
# Schema and objectClass definitions
#
include         /etc/ldap/schema/core.schema
include         /etc/ldap/schema/cosine.schema
include         /etc/ldap/schema/inetorgperson.schema
include         /etc/ldap/schema/nis.schema
include        /etc/ldap/schema/misc.schema
include        /etc/ldap/schema/openldap.schema
include         /etc/ldap/schema/samba.schema

#######################################################################
# Where the pid file is put. The init.d script
# will not stop the server if you change this.
pidfile         /var/run/slapd/slapd.pid

# List of arguments that were passed to the server
argsfile        /var/run/slapd/slapd.args

# Read slapd.conf(5) for possible values
loglevel        296

# Where the dynamically loaded modules are stored
modulepath    /usr/lib/ldap
moduleload    back_bdb

# The maximum number of entries that is returned for a search operation
sizelimit 500

# The tool-threads parameter sets the actual amount of cpu's that is used
# for indexing.
tool-threads 1

#######################################################################
# Specific Backend Directives for bdb:
# Backend specific directives apply to this backend until another
# 'backend' directive occurs
backend        bdb
checkpoint 512 30

#######################################################################
# Specific Backend Directives for 'other':
# Backend specific directives apply to this backend until another
# 'backend' directive occurs
#backend        <other>

#######################################################################
#
# SASL/TLS Stuff
#
#TLSCipherSuite HIGH:MEDIUM:+SSLv2
#TLSCACertificateFile /etc/ldap/certs/server.pem
#TLSCertificateFile /etc/ldap/certs/server.pem
#TLSCertificateKeyFile /etc/ldap/certs/server.pem

#######################################################################
# Specific Directives for database #1, of type bdb:
# Database specific directives apply to this databasse until another
# 'database' directive occurs
database        bdb
suffix          "dc=sepbulgaria"
rootdn          "cn=admin,dc=sepbulgaria"
rootpw        {SSHA}y6n7Ar4OOOJHiKkEhWXO/5FDdt0j3EPt
# Where the database file are physically stored for database #1
directory       "/var/lib/ldap"

# For the Debian package we use 2MB as default but be sure to update this
# value if you have plenty of RAM
dbconfig set_cachesize 0 2097152 0
cachesize       10000

# Sven Hartge reported that he had to set this value incredibly high
# to get slapd running at all. See http://bugs.debian.org/303057
# for more information.

# Number of objects that can be locked at the same time.
#dbconfig set_lk_max_objects 1500
# Number of locks (both requested and granted)
#dbconfig set_lk_max_locks 1500
# Number of lockers
#dbconfig set_lk_max_lockers 1500

# Save the time that the entry gets modified, for database #1
lastmod         on

###############################################################################
#
# Indices to maintain
#
index    objectClass    eq
#index    cn        eq,sub
#index    sn        pres,sub,eq
#index    uid        pres,sub,eq
#index    displayName    pres,sub,eq
#index    uidNumber    eq
#index    gidNumber    eq

###############################################################################
#
# Access control
#
# The userPassword by default can be changed
# by the entry owning it if they are authenticated.
# Others should not be able to see it, except the
# admin entry below
# These access lines apply to database #1 only
#access to attrs=userPassword,shadowLastChange
#        by dn="cn=admin,dc=sepbulgaria" write
#        by anonymous auth
#        by self write
#        by * none

# Ensure read access to the base for things like
# supportedSASLMechanisms.  Without this you may
# have problems with SASL not knowing what
# mechanisms are available and the like.
# Note that this is covered by the 'access to *'
# ACL below too but if you change that as people
# are wont to do you'll still need this if you
# want SASL (and possible other things) to work 
# happily.
#access to dn.base="" by * read

# The admin dn has full write access, everyone else
# can read everything.

access to *
        by dn="cn=admin,dc=sepbulgaria" write
        by * read

access to attrs=userPassword,sambaLMPassword,sambaNTPassword
        by dn="cn=admin,dc=sepbulgaria" write
    by anonymous auth
    by self write
        by * write

# For Netscape Roaming support, each user gets a roaming
# profile for which they have write access to
#access to dn=".*,ou=Roaming,o=morsnet"
#        by dn="cn=admin,dc=localdomain" write
#        by dnattr=owner write

###############################################################################
#
# Replication Server
#
updatedn cn=admin,dc=sepbulgaria
updateref ldap://192.168.206.129:389

The two servers are working. They are with empty databases. I can add records to both of them. There are no errors in the replication log file, but still, there is nothing on the slave server. If you need something else, tell me.

Regards.

Offline

#2 2008-10-01 14:41:10

dschrute
Member
From: NJ, USA
Registered: 2007-04-09
Posts: 183

Re: OpenLDAP, replication.

The first thing that comes to mind is not specific to LDAP...Are you allowing connection via /etc/hosts.allow ?  Or have you done anything with IPTables ?  Can the each server connect to the other on port 389 ?
If that isn't the issue, have you read the Replication docs for OpenLDAP ?
http://www.openldap.org/doc/admin24/replication.html

Offline

Board footer

Powered by FluxBB