Working with LDAP

Discussion in 'Forum for discussion of ANTICHAT' started by Dracula4ever, 20 May 2006.

  1. Dracula4ever

    Dracula4ever Elder - Старейшина

    8 May 2006
    Likes Received:
    Hey again,

    In the last few weeks I was working on an application that works with the Active Directory of Windows 2003 using LDAP.This time my boss told me to write it in Java so i went looking for a technology that implement the connection with the Active Directory and I found OpenLDAP ( first I was looking for some code examples for the jar and on Novell's site I found - that was exactly what I was looking for. Still, there was a weird problem with the password checking

    attribute = new LDAPAttribute( "userPassword", userPWD );

    that got exception every time I ran it ... but without that part the code was running perfectly and I didnt really needed it for my specific application was supposed to open a connection to the Active Directory and that's it.
    (I mean: lc.connect( ldapHost, ldapPort ); was enough)
    ah yeah, if you are trying to work with LDAP protocol dont forget that the username and password in the Active Directory isnt enough, You need to get the User's full details in the LDAP specific string (the example from the code above was "cn=JSmith,ou=sales,o=Acme")
    I dont remember the port I was using exactly but try ports 389/636.
    I am almost sure it was one of them.

    have fun! :)
Similar Threads - Working LDAP
  1. Fugitif