Could not authenticate you from Ldapmain because "Invalid credentials for fgdf"

Hi help-me

  1. Info
    System information
    System: Debian 9.7
    Current User: git
    Using RVM: no
    Ruby Version: 2.5.3p105
    Gem Version: 2.7.6
    Bundler Version:1.16.6
    Rake Version: 12.3.2
    Redis Version: 3.2.12
    Git Version: 2.18.1
    Sidekiq Version:5.2.3
    Go Version: unknown

GitLab information
Version: 11.7.5
Revision: c5b5b18
Directory: /opt/gitlab/embedded/service/gitlab-rails
DB Adapter: postgresql
Using LDAP: yes
Using Omniauth: yes
Omniauth Providers:

GitLab Shell
Version: 8.4.4
Repository storage paths:

  • default: /var/opt/gitlab/git-data/repositories
    Hooks: /opt/gitlab/embedded/service/gitlab-shell/hooks
    Git: /opt/gitlab/embedded/bin/git

configure ldap in /etc/gitlab/gitabl.rb.
It works, ‘gitlab-rake gitlab:ldap:check’ gives :
checking LDAP …
Server: ldapmain
LDAP authentication… Success
LDAP users with access to your GitLab server (only showing the first 100 results)
…list of users
Checking LDAP … Finished

  1. Ldap settings :
    gitlab_rails[‘ldap_enabled’] = true
    gitlab_rails[‘ldap_servers’] = YAML.load <<-'EOS’
    main: # ‘main’ is the GitLab ‘provider ID’ of this LDAP server
    label: 'LDAP’
    host: 'my_ldap_server’
    port: 636
    encryption: 'simple_tls’
    uid: 'uid’
    bind_dn: 'the_full_dn_of_the_user_I_will_bind_with’
    password: '_the_password_of_the_bind_user’
    timeout: 10
    allow_username_or_email_login: true
    block_auto_created_users:false
    base: 'the_name_of_the_base’
    user_filter: ‘(composante=917)’
  2. gitlab-rake gitlab:ldap:check gives:
    Checking LDAP …

Server: ldapmain
LDAP authentication… Success
LDAP users with access to your GitLab server (only showing the first 100 results)
…liste of results…
Checking LDAP … Finished

  1. on page https://gitlab.my_domain , I have sign_in with ldap but it doesn’t work.

Thanks for your help !

Hello, off the top of my head, do you have your YAML statement correct with the indenting and the EOS at the beginning and the end? Can you post your complete LDAP settings here (you should redact the username and password at least)?

It looks like lots of things are different here from my (working) LDAP configurations… For example, I have ‘sAMAccountName’ for the uid, and I have verify_certificates: true, and active_directory: true.

Also, you could step back to port: 389 and encryption: plain for troubleshooting.

Hope this helps!

This Question/Answer can be useful: How to translate working ldapsearch command into config