Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
Fellow monks,
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.


In reply to Perl in an OpenLDAP server by l3nz

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (4)
As of 2024-04-24 12:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found