Resetting the Admin password

Updated on 23 Sep 2020

Step 1

First we need to modify the /var/lib/jenkins/config.xml file and change the useSecurity setting to false

Step 2

Restart Jenkins.

sudo systemctl restart jenkins

Then when you navigate to Jenkins you bypass the login screen.

Step 3

Goto People and delete all the accounts that have admin access.

You do that by clicking on the username and clicking the delete link.

Important, just because you delete a person doesn’t mean that they are removed from this page. This page lists user accounts and people that had changes done on git!

Step 3

Enable security again. Click Manage Jenkins | Configure Global Security.

Step 4

These are the steps that I did

  • Tick Enable Security
  • Tick Jenkins' own user database
  • Tick Logged-in users can do anything
  • Click the Save button

Step 5

If everything went according to plan then I should have a log in screen that prompts to create the first admin account.