Forgot Jenkins password??1 min read

Prabhin Prabharkaran Administrator
DevOps Engineer

He is a Technical professional. He is a person who loves to share tricks and tips on the Internet. He Posts what he does!

follow me

Jenkins is a free and open-source automation server. It helps automate the parts of software development related to building, testing, and deploying, facilitating continuous integration and continuous delivery. It is a server-based system that runs in servlet containers such as Apache Tomcat.


In this document, we show you how to reset the Jenkins password. This tutorial can be used in a crucial situation when you don’t have any other option to recover the admin username and password. Its always recommended having multiple admin privileged accounts.

Step 1: Log in to the Jenkins server.
Step 2: Navigate to Jenkins home folder, usually, it be there under /var/lib/jenkins if you use packaged installation, or else it will be under .jenkins folder of the user which runs the Jenkins binary. There is a certain condition where users changed the home location so navigate to respective places.

In my case the folder is under /home/centos/.jenkins

 

cd /home/centos/.jenkins

Step 3: Edit the config file.

vi config.xml

 

change <useSecurity>true</useSecurity>
to 
<useSecurity>false</useSecurity>

Step 4: Restart the Jenkins service

service jenkins restart

Step 5: Now login back to Jenkins web console.
You can enter without a password.

Step 6:DO Reset the password for the respective user.

Step 7: Goto Configure Global Security and enable security to activate the authentication on the Jenkins console.

Happy Learning 🙂

© 2020, Techrunnr. All rights reserved.

#1
#2
#3
Questions Answered
Articles Written
Overall Points

Related posts

Leave a Reply