PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : LDAP Datenbank relplizieren



merenda
09.09.05, 09:49
Hi @all,

mein LDAP Läuft, meine Benutzerauthentifizierung scheint auch so zu laufen wie es laufen soll.
Jetzt möchte ich bevor wir produktiv gehen meinen LDAP absichern, in dem ich noch einen LDAP-Slave aufbaue, der die Aufgaben des Masters übernimmt falls er mal ausfallen sollte. Ich hab schon damit angefangen, nur will das noch nicht so funktionieren wie es soll. Wie bin ich vorgegangen:

1. Konfigurations des Masters auf dem SLAVE Kopiert

2. Einstellungen fürs Repliziren in den 2 Konfigs eingestellt

MASTER:
#~~~~~~~~~~~~~#
# Replikation #
#~~~~~~~~~~~~~#
replogfile /var/lib/openldap/slurp/slapd.replog
replica host=10.206.176.148:389
binddn="cn=replicationsadmin,o=firma,c=de"
bindmethod=simple
credentials=test

SLAVE:
#~~~~~~~~~~~~~#
# Replikation #
#~~~~~~~~~~~~~#
updatedn "cn=replicationsadmin,o=firma,c=de"
updateref 10.206.176.97:389


3. Dann habe ich mit slapcat das Verzeichnisbaum des Masters in eine LDIF - Datei kopiert

4. Die LDIF - Datei habe ich auf dem SLAVE Server kopiert und versucht mit ldapadd einzulesen, doch leider funktioniert das nicht, ich bekomme
immer wieder folgende Fehlermeldung:
g8sxa:~ # ldapadd -x -D "cn=admin,o=firma,c=de" -W -f useradd.ldif
Enter LDAP Password:
adding new entry "o=firma,c=de"
ldapadd: update failed: o=firma,c=de
ldap_add: Constraint violation (19)
additional info: structuralObjectClass: no user modification allowed

Ich Poste euch noch mal die Aktuellen Configs, dann könnt ihr mal rüber schauen:

SLES8 - LDAP - Master:
include /etc/openldap/schema/core.schema
include /etc/openldap/schema/cosine.schema
include /etc/openldap/schema/nis.schema
include /etc/openldap/schema/inetorgperson.schema
include /etc/openldap/schema/misc.schema
#include /etc/openldap/schema/krb5-kdc.schema



# Define global ACLs to disable default read access.


pidfile /var/run/slapd/slapd.pid
argsfile /var/run/slapd/slapd.args


loglevel 1024

sizelimit 500
timelimit 3600

#~~~~~~~~~~~~~~~#
# Access Regeln #
#~~~~~~~~~~~~~~~#

access to attrs=userPassword
by dn.base="cn=admin,o=firma,c=de" write
by self write
by anonymous auth
by * none

#### TEST - Maschinen ####

### Intel-TestMaschine
access to dn.subtree="ou=mars,ou=Test-Systeme,o=firma,c=de"
by dn.base="cn=admin,o=firma,c=de" write
by peername="53.139.198.186" read
by * none

### sxA
access to dn.subtree="ou=sxA,ou=Test-Systeme,o=firma,c=de"
by dn.base="cn=admin,o=firma,c=de" write
by peername="10.206.176.212" read
by peername="10.206.176.148" read
by peername="10.206.176.74" read
by * none


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

database bdb
checkpoint 1024 5
cachesize 10000

suffix "o=firma,c=de"
rootdn "cn=admin,o=firma,c=de"
rootpw test

directory /var/lib/ldap


#index default pres,eq
index objectClass eq

index cn pres,sub,eq
index sn pres,sub,eq
index uid pres,sub,eq
index displayName pres,sub,eq

index uidNumber eq
index gidNumber eq
index memberUid eq


#~~~~~~~~~~~~~#
# Replikation #
#~~~~~~~~~~~~~#
replogfile /var/lib/openldap/slurp/slapd.replog
replica host=10.206.176.148:389
binddn="cn=replicationsadmin,o=firma,c=de"
bindmethod=simple
credentials=test

SLES8 - LDAP - SLAVE:
include /etc/openldap/schema/core.schema
include /etc/openldap/schema/cosine.schema
include /etc/openldap/schema/nis.schema
include /etc/openldap/schema/inetorgperson.schema
include /etc/openldap/schema/misc.schema
#include /etc/openldap/schema/krb5-kdc.schema



# Define global ACLs to disable default read access.


pidfile /var/run/slapd/slapd.pid
argsfile /var/run/slapd/slapd.args


loglevel 1024

sizelimit 500
timelimit 3600

#~~~~~~~~~~~~~~~#
# Access Regeln #
#~~~~~~~~~~~~~~~#

access to attrs=userPassword
by dn.base="cn=admin,o=firma,c=de" write
by self write
by anonymous auth
by * none

#### TEST - Maschinen ####

### Intel-TestMaschine
access to dn.subtree="ou=mars,ou=Test-Systeme,o=firma,c=de"
by dn.base="cn=admin,o=firma,c=de" write
by peername="53.139.198.186" read
by * none

### sxA
access to dn.subtree="ou=sxA,ou=Test-Systeme,o=firma,c=de"
by dn.base="cn=admin,o=firma,c=de" write
by peername="10.206.176.212" read
by peername="10.206.176.148" read
by peername="10.206.176.74" read
by * none


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

database bdb
checkpoint 1024 5
cachesize 10000

suffix "o=firma,c=de"
rootdn "cn=admin,o=firma,c=de"
rootpw test

directory /var/lib/ldap


#index default pres,eq
index objectClass eq

index cn pres,sub,eq
index sn pres,sub,eq
index uid pres,sub,eq
index displayName pres,sub,eq

index uidNumber eq
index gidNumber eq
index memberUid eq


#~~~~~~~~~~~~~#
# Replikation #
#~~~~~~~~~~~~~#
updatedn "cn=replicationsadmin,o=firma,c=de"
updateref 10.206.176.97:389

Danke schon mal für eure Hilfe

Gruß

Merenda