Wesley Costa
asked on
Java LDAP Connection With AD DS
I developed a web site to connect through ldap connection mechanism on AD DS windows server, but I'm getting an error called GSSAPI only this error, please someone can explain or give some help to connect with Active Directory through LDAP connection ?
Check this if it works for you
ASKER
Hi John, thanks.. i have tried that last time but still not working
ASKER
this is my code...
String providerURL = obterParametro("providerUR L");
String securityAuthentication = obterParametro("securityAu thenticati on");
String securityPrincipal = obterParametro("securityPr incipal");
String propriedadeUsuario = obterParametro("propriedad eUsuario") ;
Hashtable env = new Hashtable();
env.put(Context.INITIAL_CO NTEXT_FACT ORY, "com.sun.jndi.ldap.LdapCtx Factory");
env.put(Context.SECURITY_A UTHENTICAT ION, securityAuthentication);
env.put(Context.REFERRAL, "ignore");
env.put("com.sun.jndi.ldap .connect.p ool", "false");
env.put("com.sun.jndi.ldap .connect.t imeout", "300000");
env.put(Context.PROVIDER_U RL, providerURL);
env.put(Context.SECURITY_P RINCIPAL, String.format(securityPrin cipal, usuario));
env.put(Context.SECURITY_C REDENTIALS , senha);
where
providerURL is ldap://192.168.1.7:389/
securityAuthentication is GSSAPI
securityPrincipal is the user login
String providerURL = obterParametro("providerUR
String securityAuthentication = obterParametro("securityAu
String securityPrincipal = obterParametro("securityPr
String propriedadeUsuario = obterParametro("propriedad
Hashtable env = new Hashtable();
env.put(Context.INITIAL_CO
env.put(Context.SECURITY_A
env.put(Context.REFERRAL, "ignore");
env.put("com.sun.jndi.ldap
env.put("com.sun.jndi.ldap
env.put(Context.PROVIDER_U
env.put(Context.SECURITY_P
env.put(Context.SECURITY_C
where
providerURL is ldap://192.168.1.7:389/
securityAuthentication is GSSAPI
securityPrincipal is the user login
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.