1.密码管理员密码,如何修改
进入/var/jenkins_home/users/admin目录下修改config.xml文件:
以下密码是admin
<hudson.security.HudsonPrivateSecurityRealm_-Details>
<passwordHash>#jbcrypt:$2a$10$oZgKQuNVqiMglf2lqPm2WOfXqZoq5gWt4NvrT1iugjCNEtVDsUP1G</passwordHash>
</hudson.security.HudsonPrivateSecurityRealm_-Details>
2.配置了LDAP导致管理员密码登录不了。
进入/var/jenkins_home目录下,修改config.xml文件
<securityRealm class="hudson.security.LDAPSecurityRealm" plugin="ldap@1.14">
<server>ldap://192.168.160.22:389</server>
<rootDN></rootDN>
<inhibitInferRootDN>false</inhibitInferRootDN>
<userSearchBase></userSearchBase>
<userSearch>uid={0}</userSearch>
<groupMembershipStrategy class="jenkins.security.plugins.ldap.FromGroupSearchLDAPGroupMembershipStrategy">
<filter></filter>
</groupMembershipStrategy>
<managerPasswordSecret>{AQAAABAAAAAQWUm3L5Y1+G9NqYWWEM2ogwERgidh0kbQCXCGvpdFJzQ=}</managerPasswordSecret>
<disableMailAddressResolver>false</disableMailAddressResolver>
<displayNameAttributeName>displayname</displayNameAttributeName>
<mailAddressAttributeName>mail</mailAddressAttributeName>
<userIdStrategy class="jenkins.model.IdStrategy$CaseInsensitive"/>
<groupIdStrategy class="jenkins.model.IdStrategy$CaseInsensitive"/>
</securityRealm>
改成:
<securityRealm class="hudson.security.HudsonPrivateSecurityRealm">
<disableSignup>true</disableSignup>
<enableCaptcha>false</enableCaptcha>
</securityRealm>