Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

First, I'm not an AD admin on site, but my manager has asked me to try to get my personal Redmine installation to integrate with ActiveDirectory in order to test-drive it for a larger-scale rollout.

Our AD server is at host:port ims.example.com:389 and I have a user IMS/me.

Right now, I also have a user me in Redmine using local authentication.

I have created an ActiveDirectory LDAP authentication method in RedMine with the following parameters:

Host: ims.example.com
Port: 389
Base DN: cn=Users,dc=ims,dc=example,dc=com

On-The-Fly User Creation: YES
Login: sAMAccountName
Firstname: givenName
Lastname: sN
Email: mail

Testing this connection works just fine.

I have, however, not successfully authenticated with it.

I've created a backup admin user so that I can get back in to the me account if I break things, and then I've tried changing me to use the ActiveDirectory credentials. However, once I do, nothing works to log in. I have tried all of these login name options:

  • me
  • IMS/me
  • IMS\me

I've used my known Domain password, but no joy.

So, what setting do I have wrong, or what information do I need to acquire in order to make this work?

share|improve this question

4 Answers 4

up vote 11 down vote accepted

Okay, so here are the specific settings that I needed in order to make this work:

Host: ims.example.com
Port: 389
User: MYDOMAIN\accountName
Password: *******
Base DN: dc=mydomain,dc=example,dc=com

On-The-Fly User Creation: YES
Login: sAMAccountName
Firstname: givenName
Lastname: sN
Email: mail

The trick was removing cn=Users from the Base DN, after which it all sort of came together.

The other notable thing was the inclusion of a user to read the directory.

Lastly, the user that logs in uses their user name without domain qualification, and their domain password as usual. Our domain does not require an email address, so there is an additional step where the email address has to be set during user creation, but that's pretty straightforward.

share|improve this answer
    
Ahh... I didn't even think about asking you if your user accounts were under the "CN=Users, ..." default container or not. –  Evan Anderson Dec 3 '09 at 18:58
    
It would be more useful to know how I could have determined that. I only arrived at this setup through trial and error. –  Chris R Dec 4 '09 at 4:57
    
This was largely trial and error for me, too, as I've hand-rolled my own AD authentication plugin for Devise that doesn't even require a specific AD Read account; it binds and authenticates to AD using the username/password logging in. This was mega helpful, Chris, thanks. –  Ben Kreeger May 17 '12 at 17:32
    
One clarification (it took me an entire afternoon): The account needs to be formatted as a distinguished name - not a login name. –  coz Oct 4 '12 at 13:41
    
For me the fix as adding the domain to the query user account e.g. the MYDOMAIN part. –  Andy Arismendi Feb 11 '13 at 1:37

I have no familiarity with Redmine, but it sure looks like you're trying to do an anonymous bind to Active Directory to validate credentials. That's not going to work. Having configured multiple products for LDAP integration with AD, this is a common problem that I've seen.

Out of the box, AD requires that clients authenticate when binding to the directory to perform queries.

Have a look at this Redmine wiki posting re: configuring LDAP authentication. They're talking about specifying an account and password for Redmine to use (one that has rights to read the directory-- a plain ol' "Domain User" will do) to bind to the directory.

share|improve this answer
    
What form should I put the username in? They don't really explain that in the wiki posting (which was my starting point for this process anyway) –  Chris R Dec 2 '09 at 23:47
    
Specifically, I tried IMS\me and it didn't seem to work. I can't get any details on why it's failing, either. –  Chris R Dec 2 '09 at 23:50
    
I'd specify the bind username in DOMAIN\samAccountName syntax. As far as figuring out why it's failing, I'd recommend getting a sniffer (tcpdump, wireshark, built-in Microsoft "Network Monitor", etc) out and bringing that to bear on the problem. There's no quicker way to figure out what's being said on the wire than to look at what's being said on the wire. (It sounds silly, but a lot of people don't ever think to look there...) Then, at least, you can see if the parameters you've specified are being passed as you expect them to be. –  Evan Anderson Dec 3 '09 at 0:05
    
Wireshark is turning out to be a godsend here. Thanks for that tip. I've found some issues for it, and I'll be coming through and posting the details shortly. –  Chris R Dec 3 '09 at 18:00
    
Seeing what the boxes are saying to each other makes the cause of a lot of problems instantly clear. Glad to hear you got it working! –  Evan Anderson Dec 3 '09 at 18:58

Use an ldap browser and visually check the structure... luma on ubuntu works well, ldapper for the mac also.

share|improve this answer
    
It didnt't actually work with my LDAP server, but I can see how it'd be useful. –  Chris R Jun 14 '10 at 15:25

A trick to find the Base DN for ActiveDirectory LDAP authentication is to check what the users fully qualified domain name is. you can check that with:

whoami /FQDN

if you are logged in as that user, which returns something like

CN=John Doe,OU=users,OU=department,DC=corp,DC=domain,DC=com

and the Base DN can be found by removing the first CN.

OU=users,OU=department,DC=corp,DC=domain,DC=com
share|improve this answer
    
this was incredibly helpful! thank you very much. –  Marian Theisen Nov 28 '13 at 14:14

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.