l3nz has asked for the wisdom of the Perl Monks concerning the following question:
I have lately had the problem of replicating a mySQL database of emails and phone numbers into an LDAP server so that they can be accessed by IP phones and Outlook mail clients (seems like any decent virus these days does prefer an LDAP directory to find possible email address to infect, but I'm digressing).
Instead of periodically rebuilding the LDAP server contents using a client that will query my database, determine what's new and import it into OpenLDAP and having a moderate load for the machine I'm using, I decided to avoid the updating client altogether and use the database directly from LDAP. I discovered that OpenLDAP offers a CGI-like method of invoking a shell script that reads call parameters from STDIN and which output is then parsed and sent to the LDAP client. And this works just fine, apart from the fact that I don't understand how I can bind() users to my emulated LDAP.
I wonder if there is any better way to do it - I have seen that OpenLDAP offers a Perl interface, but I could not find references on the net. Anybody ever tried something like this before? Anybody knows how to bind users in such an environment?
If anybody is interested, as there is almost nothing available on the net, I was thinking of adding a small tutorial on how to use the shellouts from OpenLDAp in Perl. Lemme know if you'd like to see it.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Perl in an OpenLDAP server
by astroboy (Chaplain) on Mar 27, 2004 at 10:02 UTC | |
by l3nz (Friar) on Mar 27, 2004 at 11:42 UTC | |
Re: Perl in an OpenLDAP server
by biosysadmin (Deacon) on Mar 27, 2004 at 11:49 UTC |