On Fri, Jan 23, 2015 at 10:32:18AM +0530, Bharath K wrote:
Subject: I am new to ldap and i dont know much about ldap simple authentication could you plz help me and give some suggestions......and below is the simple code which i tried and ther is also uid test 1&2 which i want to authenticate
It is best to put your question in the body of the message rather than all in the subject line.
env.put(Context.SECURITY_PRINCIPAL,args[0]); env.put(Context.SECURITY_CREDENTIALS,args[1]);
What values did you supply for these? What happened? What did you expect to happen?
dn: uid=nagios,ou=People,dc=example,dc=com ... userPassword::
dn: uid=test1,ou=People,dc=example,dc=com ... userPassword::
dn: uid=test2,ou=People,dc=example,dc=com ... userPassword::
All three accounts appear to have blank passwords. LDAP servers will not normally allow authentication with a blank password. For testing, you can easily add passwords like this:
userPassword: secret
Note the single ':' character. If you use '::' then the data is expected to be in Base 64.
Andrew