Results 1 to 3 of 3
  1. #1
    kasiaz is offline Member
    Join Date
    Aug 2013
    Posts
    1
    Rep Power
    0

    Default Connect to LDAP without proving id and password

    Hi,

    I would like to bypass the login id and password [Line no 6 & 7] when we connect to LDAP. I would like to use local OS authentication. Any help is appreciated.

    1. Properties properties = new Properties();
    2. properties.put( Context.INITIAL_CONTEXT_FACTORY,
    "com.sun.jndi.ldap.LdapCtxFactory" );
    3. properties.put( Context.PROVIDER_URL, "ldap://myserver.somewhere.com:389"; );
    4. properties.put( Context.REFERRAL, "ignore" );

    5. // set properties for authentication
    6. properties.put( Context.SECURITY_PRINCIPAL, "User Name" );
    7. properties.put( Context.SECURITY_CREDENTIALS, "password" );

    Best Regards,
    Kasilingam S

  2. #2
    guser is offline Member
    Join Date
    Sep 2013
    Posts
    3
    Rep Power
    0

    Default Re: Connect to LDAP without proving id and password

    Anyone?

  3. #3
    masijade is offline Senior Member
    Join Date
    Jun 2008
    Posts
    2,571
    Rep Power
    9

    Default Re: Connect to LDAP without proving id and password

    Simply don't add the last two properties, and if the LDAP server ALLOWS anonymous logins, you will get your connection.

Similar Threads

  1. last 5 password won't be same in ldap by java
    By javastuden in forum Advanced Java
    Replies: 0
    Last Post: 03-09-2012, 09:27 AM
  2. Connect To LDAP Via Proxy
    By msk20171 in forum Advanced Java
    Replies: 8
    Last Post: 01-25-2012, 08:30 PM
  3. Replies: 0
    Last Post: 09-14-2011, 10:44 AM
  4. how to check password for 3 times enterd wrong password
    By sk.mahaboobbhasha@gmail.c in forum Java Servlet
    Replies: 0
    Last Post: 11-14-2008, 02:22 PM
  5. How to check password of a jsp/html with the password of Database(mysql) #1
    By sk.mahaboobbhasha@gmail.c in forum Java Servlet
    Replies: 2
    Last Post: 11-14-2008, 02:11 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •