K
K
Kirill Ponomarev2017-04-17 16:17:20
linux
Kirill Ponomarev, 2017-04-17 16:17:20

What am I not setting correctly in Gitlab's LDAP settings?

Good day everyone.
I can't figure out what I'm doing wrong.


gitlab_rails['ldap_enabled'] = true
###! **remember to close this block with 'EOS' below**
gitlab_rails['ldap_servers'] = YAML.load <<-'EOS'
main: # 'main' is the GitLab 'provider ID' of this LDAP server
label: ' LDAP'
host: 'srv-dc'
port: 636
uid: 'sAMAccountName'
method: 'ssl' # "tls" or "ssl" or "plain"
bind_dn: 'CN=user.new,OU=Users,OU=Town ,OU=Offices,DC=example,DC=local,DC=ru'
password: 'good_password'
active_directory: true
allow_username_or_email_login: false
block_auto_created_users:
# attributes:
# username: ['uid', 'userid', 'sAMAccountName']
# email: ['mail', 'email', 'userPrincipalName']
# name: 'cn'
# first_name: 'givenName'
# last_name: 'sn'
## EE only
group_base: ''
admin_group: ''
sync_ssh_keys: false
EOS

Here is a piece of the Gitlab config, after, of course, gitlab-ctl reconfigure
gitlab-rake gitlab:ldap:check always gives

Server: ldapmain
LDAP authentication... Failed. Check `bind_dn` and `password` configuration values
​​LDAP users with access to your GitLab server (only showing the first 100 results)
Checking LDAP ... Finished

If you remove the password, then the test will pass successfully, but it will not pull up users, which is logical.
What am I doing wrong?
Thank you.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
Kirill Ponomarev, 2017-04-19
@jerichoussr

Everything turned out to be just
bind_dn - this is not the full path to the user, but just example\\user.new , i.e. just sAMAccountName

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question