Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/209.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Active directory Gitlab身份验证返回无效的用户名或密码(缺少LDAP窗格)_Active Directory_Gitlab_Ldap_Gitlab Ci_Gitlab Omnibus - Fatal编程技术网

Active directory Gitlab身份验证返回无效的用户名或密码(缺少LDAP窗格)

Active directory Gitlab身份验证返回无效的用户名或密码(缺少LDAP窗格),active-directory,gitlab,ldap,gitlab-ci,gitlab-omnibus,Active Directory,Gitlab,Ldap,Gitlab Ci,Gitlab Omnibus,我在active directory LDAP中有用户(每个用户都有用户名和电子邮件集)。 我在gitlab.rb中配置了LDAP身份验证,并运行了“gitlab ctl重新配置”。 我使用Gitlab社区版。 下面的命令返回用户,使配置看起来正常“sudogitlab rakegitlab:ldap:check”。 返回: LDAP:。。。服务器:ldapmain LDAP身份验证。。。成功 可以访问GitLab服务器的LDAP用户(仅显示前100个结果) DN:cn=Mike Gordon,

我在active directory LDAP中有用户(每个用户都有用户名和电子邮件集)。 我在gitlab.rb中配置了LDAP身份验证,并运行了“gitlab ctl重新配置”。 我使用Gitlab社区版。 下面的命令返回用户,使配置看起来正常“sudogitlab rakegitlab:ldap:check”。 返回:

LDAP:。。。服务器:ldapmain LDAP身份验证。。。成功 可以访问GitLab服务器的LDAP用户(仅显示前100个结果)

DN:cn=Mike Gordon,cn=users,dc=ad,dc=mydomain,dc=com sAMAccountName:Mike.Gordon

。。。这里是其他用户

我试图在“登录”gitlab窗格上使用LDAP用户名mike.gordon和相应的密码登录,但我得到了“无效用户名或密码”。 一些屏幕截图显示存在LDAP窗格,但即使在以下情况下也不会显示: gitlab_rails['prevent_ldap_sign_in']=false

这是我的配置:

main: # 'main' is the GitLab 'provider ID' of this LDAP server
label: 'LDAP'
host: 'myAdUrl'
port: 3268
uid: 'sAMAccountName'
bind_dn: 'CN=serveur-ovh,CN=Users,dc=ad,dc=mydomain,dc=com'
password: 'adpassword'
encryption: 'plain' # "start_tls" or "simple_tls" or "plain"
active_directory: true
allow_username_or_email_login: false
base: 'dc=ad,dc=mydomain,dc=com'
user_filter: ''
#lowercase_usernames: false
#block_auto_created_users: false
#verify_certificates: true
#smartcard_auth: false
### EE only

非常感谢您的帮助。

比较您的配置和我的配置,我有一个用户过滤器值

###! **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: 'ADHostname.example.com'
port: 636
uid: 'sAMAccountName'
method: 'ssl' # "tls" or "ssl" or "plain"
bind_dn: 'cn=UserID,ou=SystemAccounts,dc=example,dc=com'
password: 'AccountPasswordGoesHere'
active_directory: true
allow_username_or_email_login: false
block_auto_created_users: false
base: 'ou=ResourceUsers,dc=example,dc=com'
user_filter: '(&(sAMAccountName=*))' # Can add attribute value to restrict authorized users to GitLab access, we leave open to all valid user accounts in the OU. Should be able to authorize based on group membership using linked attribute value like (&(memberOf=cn=group,ou=groupOU,dc=example,dc=com))
attributes:
username: ['uid', 'userid', 'sAMAccountName']
email: ['mail', 'email', 'userPrincipalName']
name: 'cn'
first_name: 'givenName'
last_name: 'sn'

EOS
####**记住用下面的“EOS”关闭此块**

gitlab_rails['ldap_servers']=YAML.load如果没有错误日志,请尝试将allow_username_或_email_login:false更改为true,然后使用mike.gordon或他的电子邮件重试谢谢您的回答。设置为true并重新配置+重新启动gitlab不起作用。你说的是日志:我检查了应用程序;json和production.json日志,但未找到任何内容。你知道还有其他日志需要检查吗?你可以在active directory中找到有用的日志,你会看到输入请求和失败原因。我添加了你提到的用户过滤器,但它不起作用。我还试图正确缩进文件,因为重新配置后它似乎是强制性的,它会生成一个yaml,但也不起作用。我被卡住了,girlab论坛没有回应。我在gitlab UI中没有ldap选项卡可供验证。我只有“登录”和“注册”。您有这个“LDAP”选项卡可以登录吗?