1. Home
  2. Docs
  3. GCP Marketplace
  4. GCP Jenkins on Ubuntu 20.04
  5. Reset Jenkins Admin users Password

Reset Jenkins Admin users Password

If you receive an error when initializing Jenkins, it maybe due to skipping the user-creation step in the setup wizard. In this case, you can disable Jenkins Security and reset the password.

  1. Login to the Jenkins server using gcloud command.
  2. Install VIM text editor if it’s not availble.
  3. Search for vim packages run: sudo apt search vim
  4. Update package sudo apt update
  5. Install vim sudo apt install vim
  6. Verify vim installation vim --version
  7. Disable Jenkins Security sudo vi /var/lib/jenkins/config.xml
  8. Edit the useSecurity line to false
<useSecurity>true</useSecurity>

Press i to start edit mode, and set the true value to false

<useSecurity>false</useSecurity>

Save change and quit vim by typing :wq!

Restart the Jenkins server to take effect of this change

sudo systemctl restart jenkins

Retrieve new password sudo cat /var/lib/jenkins/secrets/initialAdminPassword

Access http://{your-jenkins-address}:8080 again and use this password to setup Jenkins.

Click Continue and continue setup following the setup wizard.

Was this article helpful to you? Yes No

How can we help?