Operation steps of Jenkins forgetting password under Linux
- 2021-07-10 21:32:43
- OfStack
1. Jenkins installation steps:
https://www.ofstack.com/article/176615.htm
Step 2 Change your password
(1) Edit the config. xml configuration file for Jenkins
vim /var/lib/jenkins/config.xml
(In the JENKINS_HOME directory, everyone has a different installation directory, so change to their own path.)
(2) Modify related configuration
1. Enter the Find command to find the location of the configuration:/useSecurity
STEP 2 Use < !---- > Symbol comment or directly delete the following configuration
<useSecurity>true</useSecurity>
<authorizationStrategy class="hudson.security.FullControlOnceLoggedInAuthorizationStrategy">
<denyAnonymousReadAccess>true</denyAnonymousReadAccess>
</authorizationStrategy>
<securityRealm class="hudson.security.HudsonPrivateSecurityRealm">
<disableSignup>true</disableSignup>
<enableCaptcha>false</enableCaptcha>
</securityRealm>
(3) Restart Jenkins
service jenkins restart
(4) Refresh the browser and log in to Jenkins directly (at this time, you don't need to enter a password for login)
(5) Modify security configuration
Home page- > System management- > Global security configuration- > Check "Enable Security"- > Save
(6) Change password
Home page- > User list- > Select 1 "user" and click to enter the details page- > Settings- > Change password- > Save
(7) Restart Jenkins, and you need a password to log in at this time
Summarize