Import ActiveDirectory LDIF into OpenDJ/OpenDS?

2k Views Asked by At

I need to test a LDAP synchronization service.

For that reason, I've installed OpenDJ (formerly OpenDS) LDAP server on my developer machine (ApacheDS requires admin privileges for starting/stopping a service - I don't have them & I don't get them).

OpenDS allows me to populate the LDAP with 2000 sample entries.
Unfortunately, they aren't very AD conformant:

Users

I need an ActiveDirectory properties structure:

ActiveDirectory

I used an LDIF-generator from here to generate the ActiveDirectory entries.
Then I tried importing them with Apache Directory Studio:

Apache Directory Studio

But on importing, I get this error: [LDAP: error code 65 - Entry cn=Trang Eastus,ou=Product Testing,dc=example,dc=com violates the Directory Server schema configuration because it includes attribute sAMAccountName which is not allowed by any of the objectclasses defined in that entry]

How can I import a ActiveDirectory schema with Apache Directory Studio ?
Or more generically asked, how can I get these entries in there, ASAP ?

2

There are 2 best solutions below

2
JnRouvignac On

Active Directory attribute types are not standard, so they do not come bundled in OpenDJ.

So you first need to modify OpenDJ's schema to allow adding Active Directory attributes. I suspect you would have the same kind of problems with other LDAP servers like OpenLDAP.

2
Ludovic Poitou On

I don't think Active Directory exposes its schema in an LDAP compliant way. What most users are doing when synchronizing data between AD and other LDAP servers such as OpenDJ is mapping AD attributes and objectclasses to LDAP attributes and objectclasses.

This said, you should be able to reconstruct a "user" LDAP objectclass based on Microsoft documentation of their schema. The best source I found is this table : http://www.kouti.com/tables/userattributes.htm. I don't think anyone has been down that route and efforts.

Beware, in LDAP worlds, the hierarchy of person objectclasses is person, organizationalPerson, inetOrgPerson. In MS AD world, the objectclass user is in the middle : person, organizationalPerson, user, inetOrgPerson.