1

I have an ldap server which I'm able to connect to through LDAP Apache Directory Studio. The settings in the studio are:

Hostname: ldap.company.com
Port: 389
Encryption Method: No Encryption
Provider: Apache Directory LDAP Client API
Authentication Method: Simple Authentication
BindDn or user: domain\user
Bind password: password

The same settings in the code:

    LDAPConnection connection = new LDAPConnection("ldap.company.com", 389, "domain\\user", "password");

But the code is throwing:

LDAPException(resultCode=49 (invalid credentials), errorMessage='80090308: LdapErr: DSID-0C0903D9, comment: AcceptSecurityContext error, data 52e, v2580
  at com.unboundid.ldap.sdk.LDAPConnection.bind(LDAPConnection.java:2182)
  at com.unboundid.ldap.sdk.LDAPConnection.<init>(LDAPConnection.java:671)
  at com.unboundid.ldap.sdk.LDAPConnection.<init>(LDAPConnection.java:564)
  at ldapstest.LDAPSTest.getConnection(LDAPSTest.java:21)
  at ldapstest.LDAPSTest.main(LDAPSTest.java:46)

Is the domain\username style not supported in UnboundId?

lalli
  • 6,083
  • 7
  • 42
  • 55
  • I assume you use Active Directory, can you try in the `binddn` : `user@domain` (It commonly is the `userPrincipalName` to use as `binddn`) – Esteban Jun 23 '17 at 11:43
  • @Esteban: yeah i tried that, it's giving the same issue. – lalli Jun 27 '17 at 15:45

0 Answers0