Failed LDAP user directory test without explicit error in JIRA 5.1.1

Henri Tremblay August 12, 2012

I'm trying to configure an LDAP user directory. When doing the "Test Remote Directory Connection", I'm getting

Test retrieve user : Failed

User <my_user> does not exist

The thing is that my_user is the user used to access the LDAP server. So I don't understand why it doesn't exist... An ldapsearch will return it correctly

My setup:

  • Username: uid=my_user,ou=persons,o=mycompany,dc=com
  • Base DN: ou=persons,o=mycompany,dc=com

I also tried with

  • Base DN: o=mycompany,dc=com
  • Additional User DN: ou=persons

But it also fails.

So, I have two questions:

  1. Does anybody know what's going on?
  2. How can I have some debug in the logs? It seems a UserNotFoundException should be launched but I can't get anything from the log (I tried to set in debug everything that looks related to security and users)

7 answers

1 accepted

4 votes
Answer accepted
Henri Tremblay August 12, 2012

Amazing how asking a question makes the answer appear.

So, I've turn on logs for atlassian.crowd.directory.SpringLDAPConnector.

Which makes the filter appear in the logs.

The problem comes from the User Schema Settings in the User Object Filter. By default it contains (&(objectCategory=Person)(sAMAccountName=*)). Which is completely wrong in my case. On top of that, this is concatenated to the User Name Attribute which is sAMAccountName.

It's strange that such important fields are hidden by default.

I've replace all this wrongness by filter = (uid=*) and user name attribute = uid.

Now the filter looks a bit redundant in the log since the filter field is mandatory. It get (& (uid=*) (uid=myuser)).

So, to be cuter, I've changed it to filter = (objectCategory=Person). Not really needed in my case but not harmful either.

Now everything works fine.

0 votes
amitpustode March 15, 2019

Test basic connection : Succeeded

Test retrieve user : Succeeded

Test user rename is configured and tracked : Succeeded

Test get user's memberships : Failed

Test retrieve group : Not performed

Test get group members : Not performed

Test user can authenticate : Succeeded

0 votes
Micke S. August 22, 2017

I experience the same problems as above, i tried Henris solution to change the User Schema Setting User Object Filter to (uid=*) and User name Attribute to uid, but i get the same problem.

How do i turn on the logs for the LDAP connector.

0 votes
Henri Tremblay May 29, 2014

The solution is in my previous comment

0 votes
l May 13, 2014

Test basic connection : Succeeded

Test retrieve user : Failed
User <xxxxx> does not exist
Test get user's memberships. : Not performed
Test retrieve group : Not performed
Test get group members. : Not performed
Test user can authenticate : Not performed
we have this issue ?what might me the reason .the user is in crowd
0 votes
Jobin Kuruvilla [Adaptavist]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 12, 2012

Is that user under perosons OU in LDAP?

Henri Tremblay August 12, 2012

Amazing how asking a question makes the answer appear.

So, I've turn on logs for atlassian.crowd.directory.SpringLDAPConnector.

Which makes the filter appear in the logs.

The problem comes from the User Schema Settings in the User Object Filter. By default it contains (&(objectCategory=Person)(sAMAccountName=*)). Which is completely wrong in my case. On top of that, this is concatenated to the User Name Attribute which is sAMAccountName.

It's strange that such important fields are hidden by default.

I've replace all this wrongness by filter = (uid=*) and user name attribute = uid.

Now the filter looks a bit redundant in the log since the filter field is mandatory. It get (& (uid=*) (uid=myuser)).

So, to be cuter, I've changed it to filter = (objectCategory=Person). Not really needed in my case but not harmful either.

Now everything works fine.

Suggest an answer

Log in or Sign up to answer