Gitlab integrate with Active Directory

Dear all
i run gitlab as docker container on ubuntu server and my active directory run on windows server 2019 , but after config gitlab.rb file for integrate with active directory , i face with this error : ""Could not authenticate you from Ldapmain because “Connection timed out - user specified timeout”. “”
my question is , is that necessary join my gitlab server host to active directory?
my gitlab.rb is :

Blockquote
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: ‘Active Directory’
host:‘active directory ip’
port: 389
uid: ‘sAMAccountName’
method: ‘plain’ # “tls” or “ssl” or “plain”
bind_dn: ‘CN=Ldap Search,OU=All Accounts,DC=domain,DC=com’
password: ‘12345678’
active_directory: true
allow_username_or_email_login: false
block_auto_created_users: false
base: ‘OU=All Users,DC=domain,DC=com’
EOS

and how i solved my issue??

It is not necessary, that the host server or the container are a member of the domain! You should check the connectivity, use cUrl for instance.

1 Like

i used curl -v telnet://Ip-server:port
from container to active-directory host
and its connected !!

is that necessary , bind_dn user part of administrator group in active directory?
sample : gitlab user must be normal user or admin user?
bind_dn: 'gitlab@domain.local’

OK, there are different possible reasons…

May be an older post from me can help you.

It’s for encrypted connections.

Good luck.

1 Like

i dont used encrypted , my method is plain !

i fix my issue :
write bind_dn: user@domain.com instead of
bind_dn: ‘CN=Ldap Search,OU=All Accounts,DC=domain,DC=com’
and problem has been solved !!

1 Like