How to reset password of Jenkins

Reset password of Jenkins

ssh to the server, disable authentication, set the password via the Jenkins Web UI, then enable authentication.

In configuration file of jenkins, for example: /var/lib/jenkins/config.xml

Change from:
<useSecurity>true</useSecurity>
to:

<useSecurity>false</useSecurity>
Comment out the authorizationStrategy block
<!--authorizationStrategy class="hudson.security.GlobalMatrixAuthorizationStrategy">
<permission>hudson.model.Computer.Configure:i88ca</permission>
...
</authorizationStrategy-->
restart jenkins, such as:
$  sudo systemctl restart jenkins
After changing the password from web UI, you need to change back the configuration and restart jenkins service.

Comments

Popular posts from this blog