python ldap bind error

Discussion in 'Python' started by Jorge Alberto Diaz Orozco, Dec 17, 2012.

  1. hi there.
    I'm working with python ldap and I need to authenticate my user.
    this is the code I'm using.

    import ldap
    ldap.set_option(ldap.OPT_REFERRALS,0)
    ldap.protocol_version = 3
    conn = ldap.initialize("ldap://ldap.domain.cu")
    conn.simple_bind_s("","password")

    every time I do this it gives me the next error:
    ldap.INVALID_DN_SYNTAX: {'info': 'invalid DN', 'desc': 'Invalid DN syntax'}

    can someone help me???
    I don't know what I'm doing wrong

    10mo. ANIVERSARIO DE LA CREACION DE LA UNIVERSIDAD DE LAS CIENCIAS INFORMATICAS...
    CONECTADOS AL FUTURO, CONECTADOS A LA REVOLUCION

    http://www.uci.cu
    http://www.facebook.com/universidad.uci
    http://www.flickr.com/photos/universidad_uci
     
    Jorge Alberto Diaz Orozco, Dec 17, 2012
    #1
    1. Advertising

  2. Jorge Alberto Diaz Orozco wrote:
    > hi there.
    > I'm working with python ldap and I need to authenticate my user.
    > this is the code I'm using.
    >
    > import ldap
    > ldap.set_option(ldap.OPT_REFERRALS,0)
    > ldap.protocol_version = 3
    > conn = ldap.initialize("ldap://ldap.domain.cu")
    > conn.simple_bind_s("","password")
    >
    > every time I do this it gives me the next error:
    > ldap.INVALID_DN_SYNTAX: {'info': 'invalid DN', 'desc': 'Invalid DN syntax'}


    "" is not a DN as required in RFC 4511:

    http://tools.ietf.org/html/rfc4511#section-4.2

    MS AD directly accepts a userPrincipalName but this is a highly proprietary
    feature => search the user's entry first.

    Ciao, Michael.
     
    Michael Ströder, Dec 22, 2012
    #2
    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. Replies:
    1
    Views:
    557
    Raymond DeCampo
    Feb 21, 2006
  2. rcmn
    Replies:
    1
    Views:
    377
    =?ISO-8859-1?Q?Michael_Str=F6der?=
    Nov 6, 2006
  3. Jason Wold

    using LDAP Controls in ruby-ldap

    Jason Wold, Nov 4, 2004, in forum: Ruby
    Replies:
    5
    Views:
    283
  4. Ian Macdonald
    Replies:
    0
    Views:
    241
    Ian Macdonald
    Mar 15, 2005
  5. Pokkai Dokkai

    LDAP bind error

    Pokkai Dokkai, Oct 8, 2007, in forum: Ruby
    Replies:
    2
    Views:
    112
    Pokkai Dokkai
    Oct 8, 2007
Loading...

Share This Page