I have been at least two days trying to make this work with Active directory.

when I run this command see the result:

sudo gitlab-rake gitlab:ldap:check RAILS_ENV=production                                               Checking LDAP ...

Server: ldapmain
LDAP authentication... Success
LDAP users with access to your GitLab server (only showing the first 100 results)

Checking LDAP ... Finished

However I can´t log in using AD users, it says invalid credentials. This is my config file (/etc/gitlab/gitlab.rb)

gitlab_rails['ldap_enabled'] = true
gitlab_rails['ldap_servers'] = YAML.load <<-EOS
     label: 'Active Directory'
     host: 'dc.example.com'
     port: 389
     uid: 'sAMAccountName'
     encryption: 'plain'
     bind_dn: 'userldap@example.com'
     password: 'userldap_password'
     active_directory: true
     allow_username_or_email_login: false
     block_auto_created_users: false
     base: 'ou=Users,DC=example,DC=com

This running on CentOS 7. Please some help.

Thanks in advance.

Kind Regards


First make sure that it's ActiveDirectory instead of Active Directory.

Second you can define a timeout e.g.: timeout: 10

Probably because your ldap is succeeding you might want to check your user_filter or your base DN.

Furthermore the config file is space-sensitive:

  • One space before main
  • 2 spaces before each line below main
  • no space before EOS

Also after you made changes make sure to do a gitlab-ctl reconfigure.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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