Jenkins Forgot Password Solution

Jenkins Forgot Password Solution

I built a Jenkins on my computer a long time ago, but it has been in disrepair and I forgot my password. It doesn't matter if you don't log in. All operations have permission to use them, but you have just used it. You set up only logged in users to operate Jenkins. Dumbfounded, nothing can be operated, and the password is not remembered, what should I do?

As the so-called Jenkins has no road to humanity, violent resolution requires only 4 steps.

Operation begins:

STEP1. Determine your Jenkins home directory

View the main directory in [System Management]-> [System Settings], my main directory is:

/Users/bixiaopeng/.jenkins

STEP2. Modify some configuration information in Jenkins configuration file

vim /Users/bixiaopeng/.jenkins/config.xml

Remember to back up config.xml before modifying it. Well, backing up files is a good habit.

Two operations are required for config.xml:

1.修攺 useSecurity 值为 false
<useSecurity>false</useSecurity>

2.删除   
<authorizationStrategy class="hudson.security.AuthorizationStrategy$Unsecured"/>

STEP3. Restart Jenkins

~$ jenkins restart

STEP4. Change password

For security reasons, it is still necessary to restrict the user's operating authority, so change the password.

Author: old Bi

Old Bi

Published 188 original articles · praised 421 · 2.79 million views

Guess you like

Origin blog.csdn.net/wirelessqa/article/details/53020548
Recommended