Saturday, August 1, 2020

How to Reset Jenkins Admin password | Jenkins admin password unlock | Forgotten Jenkins Admin Password | How to Recover Jenkins admin password

How to Reset the Jenkins administrator password?

Let's say you have forgotten Jenkins admin password. How to reset or retrieve the admin password? Here below are the steps for resetting Jenkins admin password:

1. Edit the Jenkins config.xml under /var/lib/jenkins to disable securityFlag by executing below command:

sudo vi /var/lib/jenkins/config.xml


you need to disable security to Jenkins by below change
2. Find this <useSecurity>true</useSecurity> and change it to <useSecurity>false</useSecurity>
3. Restart Jenkins by below command:
sudo service jenkins restart
4. Access Jenkins now, click on Manage Jenkins, click on configure Global security 

5. click on Enable security 

6. Click on Jenkins Own user database option.



7. click on apply and save
8. Now click on Manage users, click on admin, click on configure






  9. Enter new password and apply/save

After changing the password, you will be able to log into your Jenkins controller again using the same username and the new password that you have just set.

Enable security

  1. Log in as your admin account.

  2. On the dashboard, select Manage Jenkins in the navigation pane on the left side of the page.

  3. On the Manage Jenkins page, under the Security section, select Configure Global Security.

  4. Set the Authorization to Logged-in users can do anything. Uncheck the option Allow anonymous read access. Select Save.

1 comment:

  1. Hi, How to find unhased password name and path in ubuntu server

    ReplyDelete

How to install Checkov | How to Scan Terraform Code for finding security issues using Checkov

  Checkov is a static code analysis tool designed to scan Infrastructure as Code (IaC) files and identify potential security and compliance ...