How do I bind to LDAP with a username/password
- From: laredotornado <laredotornado@xxxxxxxxxxx>
- Date: Tue, 10 Mar 2009 12:11:28 -0700 (PDT)
Hi,
I'm using Java 1.5. Does anyone know how I can bind to an LDAP server
with a username and password? Note that this is different from
authenticating against an LDAP server with a username and password.
That I can set up like so ...
Hashtable env = new Hashtable(5, 0.75f);
...
env.put(Context.SECURITY_PRINCIPAL, name+"@" + this.domain);
env.put(Context.SECURITY_CREDENTIALS, pass);
...
InitialLdapContext context = null;
context = new InitialLdapContext(env, null);
I was looking at ways of writing the LDAP connect string (http://
www.rlmueller.net/LDAP_Binding.htm), and there seems to be a place for
the bind username ("cn") but I can't see where the password would go.
Any help is appreciated, - Dave
.
- Follow-Ups:
- Re: How do I bind to LDAP with a username/password
- From: Roedy Green
- Re: How do I bind to LDAP with a username/password
- From: Nigel Wade
- Re: How do I bind to LDAP with a username/password
- Prev by Date: autorestart script for Sunone WS
- Next by Date: Re: Tomcat can't 'see' new files
- Previous by thread: autorestart script for Sunone WS
- Next by thread: Re: How do I bind to LDAP with a username/password
- Index(es):
Relevant Pages
|