2

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
 main:
     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
EOS'

This running on CentOS 7. Please some help.

Thanks in advance.

Kind Regards

Mark Henderson
  • 68,823
  • 31
  • 180
  • 259
  • There are some [good suggestions here](https://docs.gitlab.com/ee/administration/auth/ldap.html#invalid-credentials-when-logging-in). Have you tried all of this? – Aaron Copley May 03 '18 at 15:47

1 Answers1

2

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.

timmeyh
  • 968
  • 1
  • 6
  • 25