2

New to LDAP. Exported the DIT as an LDIF from Apache Studio. Tried to import the LDIF file. Error occurs:

...
#!ERROR [LDAP: error code 32 - Unable to add entry 'dc=example,dc=com' because its parent entry 'dc=com' does not exist in the server.]
dn: dc=example,dc=com
changetype: add
dc: example
objectClass: domain
objectClass: top

The LDAP server is UnboundID LDAP SDK for Java 3.2.0.

I don't know enough LDAP to fix it.

Should Apache Studio have created dc=com before this entry?

ahoffer
  • 6,347
  • 4
  • 39
  • 68
  • Where do you want to import this to? What is your server? In general, You don't have a suffix or backend defined with dc=example,dc=com. – Bertold Kolics Mar 15 '17 at 19:51
  • Two things I found out. The LDIF file didn't actually include the 'add' action to create entries, which I thought was odd. Second, if I added 'dc=com' at the top of the file, then I got an error that it's parent, null, did not exist. However, if I created 'dc-com' by other means, I wouldn't get an error. – ahoffer Mar 17 '17 at 03:11

1 Answers1

0

LDIF export does not guarentee ordering. LDIF import assumes ordering.

So to answer your question, yes, you should have created dc=com first.

There is a subtle exception where you can have a dc=example.com as a single node which looks confusing. But periods are legal in a name.

geoffc
  • 4,030
  • 7
  • 44
  • 51