Reset Jenkins Admin Password

 

Stop Jenkins:

On Linux, use sudo service jenkins stop.

On Windows, stop the Jenkins service from the Services window.



Access the Jenkins Home Directory:

By default, the home directory is located at /var/lib/jenkins/ on Linux and %JENKINS_HOME% on Windows.

Remove the config.xml for Security:

In the Jenkins home directory, locate the config.xml file.

Open it in a text editor and search for the <useSecurity> tag.

Change the value to false:

xml

Copy code

<useSecurity>false</useSecurity>

File will look like below-


Save the file and exit.

Start Jenkins:

Start Jenkins again (sudo service jenkins start for Linux).

Jenkins should now start without asking for a login, and you can create a new user or reset the credentials.

Re-enable Security:

Once you've logged in and set up new credentials, go back to the config.xml file.

Set <useSecurity> back to true and restart Jenkins to enable security again.

Comments

Popular posts from this blog

How to enable AWS EBS Volume snapshots encryption

Deploying App through AWS EKS by using ingress and fargate