Linux, Python 2.5.2, serverless binding LDAP?

Michael Ströder michael at
Fri Nov 13 11:04:57 CET 2009

Kevin Cole wrote:
> On Nov 12, 8:01 pm, alex23 <wuwe... at> wrote:
>> On Nov 13, 10:47 am, Kevin Cole <dc.l... at> wrote:
>>> I recently asked our IT department how to gain access to an
>>> addressbook.  After carefully explaining that I was on a Linux system
>>> using Python, I got the reply:
>>> "You should use our LDAP. With LDAP you can pull any data you want
>>> from Active Directory. On our network, the serverless binding address
>>> for our LDAP is ldap://dc=...,dc=...,dc=...,dc=..."
>>> with the actual "..." filled in.
>>> I don't know squat about LDAP, but installed the python-ldap deb, and
>>> started glancing at the documentation on-line. I didn't see anything
>>> obvious for working with the URI above.  Can I work w/ it?  If so, a
>>> short example, please?
>>> Thanx.
> Ah, it wasn't clear to me that "localhost:1389" meant serverless.
> Armed with that, I'm off to experiment.

localhost:1389 means localhost on port 1389. It has nothing to do with
server-less bind.

Server-less bind is based on a DNS lookup: Let's say you want to query the DNS
server for returning the LDAP server(s) for naming context dc=uninett,dc=no
then invoke on the command-line:

$ host -t srv has SRV record 0 0 389

That is also heavily used with MS AD.

Off course you can do this SRV lookup with which is
actually done in my LDAP client,dc=no??one

Ciao, Michael.

Michael Ströder
E-Mail: michael at

More information about the Python-list mailing list