0

I'm trying to set up an LDAP Replication server by following this (https://www.server-world.info/en/note?os=Ubuntu_16.04&p=openldap&f=5) tutorial.

At Step "[3] Configure LDAP Consumer" I've got the ldapadd error message "ldapass: invalid foramt (line 6) entry: "olcDatabase={1}mdb,cn=config"

My config file with ldapadd command

What am I doing wrong?

Update:

I´ve got 2 Virtual Machines with Ubuntu Server 16.04 LTS. The First Server is an working LDAP Server. On the second one I´ve set up an "empty" LDAP server to use it as Replicant.

I have followed the given tutorial successfull until step 3. At this step appeard the (in the Picture above) given errormessage by adding the ldif config.

dr_
  • 1,085
  • 12
  • 19
Tabby
  • 21
  • 2
  • 5
  • What is line 6 in "olcDatabase={1}mdb,cn=config" that is showing up as an error. Please paste the contents of that file also in question. – Anirudh Malhotra Oct 24 '16 at 08:08
  • I Have updates my Question – Tabby Oct 24 '16 at 12:58
  • I see you have posted another question "http://serverfault.com/questions/810878/ldapadd-openssh-lpk-schema-invalid-format" and apparently it was solved by placing everything **one line**. Maybe this will work doing that. **But It should work in different lines too**. I see you are using a console( I guess some kind of VM console?) to do config and stuff. Can you try and login via ssh and then try with the content in separate lines rather than using console and vim. If this helps, please mark it as helpful or answered. – Anirudh Malhotra Oct 24 '16 at 18:29
  • Thanks! But the same error Accours – Tabby Oct 25 '16 at 05:48

2 Answers2

2

Solved.

This tutorial (http://www.linuxlasse.net/linux/howtos/OpenLDAP_N-Way_MultiMaster_Replication) has a Headline Errors and Fixes. There is said, that I schould add following lines among the changetype: modify line:

add: olcSuffix
olcSuffix: dc=test,dc=local

add: olcRootDN
olcRootDN: cn=admin,dc=test,dc=local

add: olcRootPW
olcRootPW: test

Now it works.

dr_
  • 1,085
  • 12
  • 19
Tabby
  • 21
  • 2
  • 5
0

Tabs are not good characters to use in ldif.

The example tutorial uses 2 spaces. You should also use 2 spaces. The first space is ldif for last line continues here. The second space makes sure that you have a space between the first and the second lines. Difference between one two and onetwo. Tabs do not do the same thing.

84104
  • 12,905
  • 6
  • 45
  • 76
  • But After I typed in ldapadd... an error accours saying: "ldap_modify: Other(e.g., implementation spezific) error (80) additional Info: Base DN "dc=c010.dc=basf-ag,dc=de" is not within the Database naming context" – Tabby Oct 25 '16 at 05:47