以下の設定ファイルを編集すればOK
(GitLab CE Omnibus packageでインストールした環境であることが前提です)
sudo vi /opt/gitlab/embedded/service/gitlab-rails/config/gitlab.yml
デフォルト
#
# 3. Auth settings
# ==========================
## LDAP settings
# You can inspect a sample of the LDAP users with login access by running:
# bundle exec rake gitlab:ldap:check RAILS_ENV=production
ldap:
enabled: false
host:
port:
uid:
method: # "tls" or "ssl" or "plain"
bind_dn:
password:
active_directory:
allow_username_or_email_login:
base:
user_filter:
編集後(例)
#
# 3. Auth settings
# ==========================
## LDAP settings
# You can inspect a sample of the LDAP users with login access by running:
# bundle exec rake gitlab:ldap:check RAILS_ENV=production
ldap:
enabled: true
host: ***.***.***.***
port: 389
uid: sAMAccountName
method: plain # "tls" or "ssl" or "plain"
bind_dn: CN=Administrator,CN=Users,DC=gitlab,DC=local
password: ********
active_directory: true
allow_username_or_email_login: false
base: DC=gitlab,DC=local
user_filter:
再起動
sudo gitlab-ctl restart
LDAPのユーザでログインできるようになります。