Linux, Python 2.5.2, serverless binding LDAP?

Discussion in 'Python' started by Kevin Cole, Nov 13, 2009.

  1. Kevin Cole

    Kevin Cole Guest

    Hi,

    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.
    Kevin Cole, Nov 13, 2009
    #1
    1. Advertising

  2. Kevin Cole

    alex23 Guest

    On Nov 13, 10:47 am, Kevin Cole <> wrote:
    > Hi,
    >
    > 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.


    http://www.python-ldap.org/doc/html/ldapurl.html#example
    alex23, Nov 13, 2009
    #2
    1. Advertising

  3. Kevin Cole

    Kevin Cole Guest

    On Nov 12, 8:01 pm, alex23 <> wrote:
    > On Nov 13, 10:47 am, Kevin Cole <> wrote:
    >
    >
    >
    > > Hi,

    >
    > > 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.

    >
    > http://www.python-ldap.org/doc/html/ldapurl.html#example


    Ah, it wasn't clear to me that "localhost:1389" meant serverless.
    Armed with that, I'm off to experiment.

    Thanks.
    Kevin Cole, Nov 13, 2009
    #3
  4. Kevin Cole

    Kevin Cole Guest

    On Nov 12, 8:01 pm, alex23 <> wrote:
    > On Nov 13, 10:47 am, Kevin Cole <> wrote:
    >
    >
    >
    > > Hi,

    >
    > > 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.

    >
    > http://www.python-ldap.org/doc/html/ldapurl.html#example


    On second thought... That didn't help at all. The example just shows
    how to parse a URI. I'm trying to connect to a service (if I
    understand correctly) that is NOT on my Linux box, but somewhere out
    in our IT department's ether, and I do not have host/domain to work
    with. I interpreted "serverless binding" to mean that I was
    connecting by some means other than host.domain:port. Yes?
    Kevin Cole, Nov 13, 2009
    #4
  5. Kevin Cole wrote:
    > On Nov 12, 8:01 pm, alex23 <> wrote:
    >> On Nov 13, 10:47 am, Kevin Cole <> 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.

    >> http://www.python-ldap.org/doc/html/ldapurl.html#example

    >
    > 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 _ldap._tcp.uninett.no.
    _ldap._tcp.uninett.no has SRV record 0 0 389 ldap.uninett.no.

    That is also heavily used with MS AD.

    Off course you can do this SRV lookup with http://pydns.sf.net which is
    actually done in my LDAP client http://web2ldap.de:

    http://demo.web2ldap.de:1760/web2ldap?ldap:///dc=uninett,dc=no??one

    Ciao, Michael.

    --
    Michael Ströder
    E-Mail:
    http://www.stroeder.com
    Michael Ströder, Nov 13, 2009
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Rlrcstr

    Creating a "serverless" app...

    Rlrcstr, Jun 9, 2005, in forum: ASP .Net
    Replies:
    2
    Views:
    392
    Rlrcstr
    Jun 10, 2005
  2. Replies:
    1
    Views:
    528
    Raymond DeCampo
    Feb 21, 2006
  3. rcmn
    Replies:
    1
    Views:
    333
    =?ISO-8859-1?Q?Michael_Str=F6der?=
    Nov 6, 2006
  4. Jason Wold

    using LDAP Controls in ruby-ldap

    Jason Wold, Nov 4, 2004, in forum: Ruby
    Replies:
    5
    Views:
    242
  5. Ian Macdonald
    Replies:
    0
    Views:
    217
    Ian Macdonald
    Mar 15, 2005
Loading...

Share This Page