LoginSignup
14
14

More than 5 years have passed since last update.

GitLabでLDAP連携するための設定

Posted at

以下の設定ファイルを編集すれば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のユーザでログインできるようになります。

Sign in - GitLab (1).png

14
14
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
14
14