Failed LDAP user directory test without explicit error in JIRA 5.1.1

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)

6 answers

1 accepted

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

Is that user under perosons OU in LDAP?

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.

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

The solution is in my previous comment

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.

Suggest an answer

Log in or Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

2,801 views 11 18
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot