美文网首页
【gerrit】Invalid username or pass

【gerrit】Invalid username or pass

作者: 熊本猫 | 来源:发表于2019-12-31 14:58 被阅读0次

背景

gerrit使用的LDAP域账号登录,近期有用户反馈域账号无法登录,报错Invalid username or password.但是他们使用同样的账号密码可以登录其他平台。

解决

因为用户可以登录其他地方,所以怀疑是gerrit上面的用户密码未同步最新的数据。开始找了RESTAPI想删掉用户重新添加,可是DELETE /a/accounts/{account_id}/active一直报错。
后来灵机一动想起来,我们有多个域认证服务器,是不是在gerrit.config里面换一个ldap地址就可以让它重新同步了呢?改过之后果然生效了~

gerrit.config示例

[ldap]
        server = ldap://server2.com
        #server = ldap://server1.com
        username = xxx@xxx.com
        accountBase = DC=xxx,DC=com
        accountPattern = (&(objectClass=person)(sAMAccountName=${username}))
        accountFullName = Description
        accountEmailAddress = mail
        accountSshUserName = sAMAccountName
        groupName = cn

相关文章

网友评论

      本文标题:【gerrit】Invalid username or pass

      本文链接:https://www.haomeiwen.com/subject/xpwboctx.html