How do I set up an active directory configuration pointing at a folder with spaces in the name?

Justin Corcoran
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.
March 29, 2012

I'm trying to connect my JIRA instance to Active Directory. I was able to connect to the active directory host, and to a folder called "Users" using this construction:

cn=users,dc=example,dc=com

Of course I changed "example" and "com," but since I'm not sure if that's sensitive information, I'll leave it out. My problem is this: the users I want to sync with JIRA aren't in the "users" folder, they're in a "Managed Users" folder. When I enter this:

cn=Managed Users,dc=example,dc=com (uppercase and lowercase didn't seem to matter)

I get the following error:

Test retrieve user : Failed
org.springframework.ldap.NameNotFoundException: [LDAP: error code 32 - 0000208D: NameErr: DSID-031001CD, problem 2001 (NO_OBJECT), data 0, best match of: 'DC=wonderlic,DC=internal' ]; nested exception is javax.naming.NameNotFoundException: [LDAP: error code 32 - 0000208D: NameErr: DSID-031001CD, problem 2001 (NO_OBJECT), data 0, best match of: 'DC=wonderlic,DC=internal' ]; remaining name 'cn=managed users,dc=wonderlic,dc=internal'
For more information regarding LDAP error codes see Troubleshooting LDAP Error Codes.

It seems to me that the problem is because the folder/directory name has a space in it. I tried single and double brackets around the name, still doesn't work. Any suggestions?

2 answers

1 accepted

0 votes
Answer accepted
Justin Corcoran
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.
March 30, 2012

Turns out I needed to be using "ou" instead of "cn"

Here's the reply I got from Atlassian support:

The CN value is only for a group, user or contact of the LDAP directory. So, the LDAP structure should be <tt>dc=Users,dc=example,dc=com</tt> or<tt>ou=Managed Users,dc=example,dc=com</tt>

However, facing what you are trying to achieve, I believe that the best option to set an external directory would be to:

  1. Set the Base DN value only with the root domain
  2. Check the 'How to write LDAP search filters documentation to better plan the users and group import process.
0 votes
lrobertson39
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.
March 30, 2012

Have you tried escaping the space using a '\' ?

Suggest an answer

Log in or Sign up to answer