【问题标题】:gitlab 7.7.2 on RHEL 6 ldap configurationRHEL 6 ldap 配置上的 gitlab 7.7.2
【发布时间】:2015-04-10 12:56:26
【问题描述】:
gitlab_rails['ldap_enabled'] = true
gitlab_rails['ldap_servers'] = YAML.load
main: # 'main' is the GitLab 'provider ID' of this LDAP server
label: 'LDAP'
 host: 'ServerLdap'
 port: 389
 uid: 'sAMAccountName'
 method: 'plain' # "tls" or "ssl" or "plain"
 bind_dn: 'uid=***,ou=JeniePortal,ou=applications,***'
 password: 'passw@rd'
 active_directory: false
 allow_username_or_email_login: false
 base: '0=sample'
 user_filter: '' 
EOS   

我也尝试了 uid 而不是 sAMAccountName。
用户仍然无法进行身份验证。
请帮忙。

【问题讨论】:

  • gitlab-rake gitlab:env:info 系统信息 系统:RedHatEnterpriseServer 6.6 当前用户:git 使用 RVM:无 Ruby 版本:2.1.4p265 Gem 版本:2.2.1 Bundler 版本:1.5.3 Rake 版本:10.3.2 Sidekiq 版本:2.17.8 GitLab 信息版本:7.7.2 修订:bd98290 目录:/opt/gitlab/embedded/service/gitlab-rails 数据库适配器:postgresql URL:http://****** dcn HTTP 克隆 URL:http://**dcn/some-project.git SSH 克隆 URL:git@*******dcn:some-project.git 使用 LDAP:是 使用 Omniauth:否 GitLab Shell 版本: 2.4.2 存储库:
  • gitlab-rake gitlab:check Checking Environment ... Git 为 git 用户配置了吗? ...是检查环境...完成检查GitLab Shell ...
  • 正在检查 Sidekiq ... 已完成检查 LDAP ... 可以访问 GitLab 服务器的 LDAP 用户(仅显示前 100 个结果) 服务器:ldapmain DN:uid=Fidel Sevillano uid:Fidel Sevillano DN: uid=test tsbuser2343 uid:test tsbuser2343 DN:uid=test tsbuser2341 uid:test tsbuser2341
  • 我用虚拟值代替了绑定 dn / 密码。问问题的时候。如您所见 ldap: check 工作正常。我给出的值是准确的吗?是的,我没有使用 Active Directory。

标签: linux ldap redhat gitlab


【解决方案1】:

我不确定您的实际问题是什么,但我首先注意到的是您的bind_dn 缺少uid 值部分。 bind_dn 定义了用于查找想要登录的用户的用户。当您连接到应该类似于 sAMAccountName=xyz,ou=JeniePortal,ou=applications 的 ActiveDirectory 时,密码应该是该用户的密码。当 ActiveDirectory 允许匿名访问时,您可以将这两个参数留空 (bind_dn='')

【讨论】:

  • AFAIK 用于 AD bind_dn: 'CN=gitlab,OU=foo,DC=bar,DC=com' 和 uid: 'sAMAccountName'。但从(清理后的)配置来看,他不在 AD 上。
  • bind_dn 是用户的 DN,用于为尝试登录的用户进行初始搜索绑定。这取决于 AD 的设置,但给定的 uid=,ou=JeniePortal,ou=applications 肯定不起作用因为没有设置uid。并且 AFAIK uid 在 AD 上不可用。因此bind_dn 应该读为sAMAccountName=xyz,ou=JeniePortal,ou=applications 之类的内容,以允许名称为xyz 的用户用于初始查找
猜你喜欢
  • 1970-01-01
  • 2017-07-26
  • 2021-01-09
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2019-09-05
  • 1970-01-01
相关资源
最近更新 更多