0

For development purposes so I can query and test a C# LDAP integration, I have set up an Active Directory Lightweight Directory Services (AD LDS) instance on my Windows 10 box. I need to populate this with an LDAP structure taken from a sample Active Directory implementation. Test data is fine (vs someone's live production data).

Here are my questions...

  1. Can I initialize my local AD LDS store with sample data taken from AD?
  2. If so, how is this done?
  3. Is there somewhere I can obtain a downloadable sample AD LDAP structure that can be used to import/initialize my local AD LDS store?
John Livermore
  • 303
  • 1
  • 3
  • 8
  • 1
    To be fair LDAP import/export is definatey a server fault topic, especially when related to AD. Using it for testing is a different question but I think this it's fair for this to question to be here. – TheFiddlerWins Mar 31 '16 at 13:03

1 Answers1

1

AD is more than just an LDAP database (it's like the mutant inbred offspring of LDAP and x500 along with some MS flavoring thrown in) but you should be able to dump a large portion of AD's LDAP data with the ldapsearch tool.

Try the following

ldapsearch -h ad.domain.com -p 389 -D username@ad.domain.com -w password -LLL > export.ldif

Then use ldapadd to import the LDIF file.

TheFiddlerWins
  • 2,973
  • 1
  • 14
  • 22