Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Active Directory LDAP sample

I'm writing an app that interfaces with Active Directory using the PHP adLDAP libraries.

In order to test the app, I need a local LDAP DB with sample data using the Active Directory Schema.

I have installed Apache Directory and got a test LDAP instance. However I cannot find a good source of sample data using the AD schema.

Am I on the right track? Where can I get good quality sample AD datasets?

like image 256
Steve E. Avatar asked Dec 14 '15 13:12

Steve E.


2 Answers

On generating data, I use the faker library which is partly inspired by the PHP version.

I recently released an internal project that uses Faker to generate LDAP data for testing called Eris. It's not been heavily tested but works for my needs. Eris is like a chaos monkey for Samba 4 or MS AD that creates, deletes, and moves accounts at random.

That said, as I'm focused on Microsoft directories, I recommend using Samba 4. It uses the standard Microsoft Active Directory schema out of the box.

The easiest set up is Debian (preferably 8) with the distribution packages. This is a pretty good guide for Ubuntu.

If you're an Amazon AWS user, you can stand up an instance of their Simple AD service (which is Samba 4) in no time.

The AWS option will help you get a feel for long distance LDAP request/response latency while a local VM (Debian, Ubuntu, ...) will be easier to reset/rebuild if you mess up the database, configuration, etc.

Note: The AWS option is a service and not shell accessible. As such it will have no external connectivity.

like image 126
Will Avatar answered Oct 19 '22 21:10

Will


Already answered here: Public Active directory for testing

But you might want to sign up for an Azure account and try there. Or install a Windows Server on a VM since you can use it for 120 days without a license, see http://stef.thewalter.net/how-to-create-active-directory-domain.html

like image 21
Eduardo Avatar answered Oct 19 '22 21:10

Eduardo