Recover Lost Admin Password in Jenkins

in utopian-io •  7 years ago  (edited)

Jenkins is an open-source automation server which is used to automate tasks like building the project, deploying. I am using Jenkins for building .Net projects and then deploying it on to the Dev, Stage and Prod Server.
Creating a Job in Jenkins means creating Pipeline (Jenkins Pipeline) which is a combination of plugins used to create continuous flow of actions.

For Example : I will create a Jenkins Pipeline which will Build the .Net Project from Github and then deploy it to the Windows Server. For that I need to add a GitHub Plugin which will check if any new commits have been added or not, MSBuild plugin for building the .Net Project and the last is msdeploy for deploying the build to the server.

This is the small introduction of Jenkins and Jenkins Pipeline. So I am the admin of the jenkins server and we have Jenkins Security, so that I can only run the pipelines. But recently after updating my Windows from 7 to 10, I lost all my saved password. I know, I should have backed up.

Now I cannot login to Jenkins and they also do not have an option to Reset the password. So, the Only thing pending for me to update the Config File. I will show you the Step by Step process how I have recovered the password or better way to say How I managed to Login again to Jenkins Server.

Step 1 : You need to get an Admin Privilege for the Windows Server where you have hosted your Jenkins and login to the Server and go inside the Jenkins folder.

Step 2 : Then you need to Stop the Jenkins Service Using Command jenkins.exe stop

Step 3 : Open config.xml file and update useSecurity as false.

image.png

Step 4 : Start Jenkins Service Using Command jenkins.exe start.

Step 5 : Now from the website again create a new User having the Admin privilege.

These are the above steps to recover the account if you have lost the admin password, but I do recommend not to lose the password and take a back up of it.



Posted on Utopian.io - Rewarding Open Source Contributors

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!
Sort Order:  

Thank you for the contribution. It has been approved.

You can contact us on Discord.
[utopian-moderator]

Hey @codingdefined I am @utopian-io. I have just upvoted you!

Achievements

  • Seems like you contribute quite often. AMAZING!

Suggestions

  • Contribute more often to get higher and higher rewards. I wish to see you often!
  • Work on your followers to increase the votes/rewards. I follow what humans do and my vote is mainly based on that. Good luck!

Get Noticed!

  • Did you know project owners can manually vote with their own voting power or by voting power delegated to their projects? Ask the project owner to review your contributions!

Community-Driven Witness!

I am the first and only Steem Community-Driven Witness. Participate on Discord. Lets GROW TOGETHER!

mooncryption-utopian-witness-gif

Up-vote this comment to grow my power and help Open Source contributions like this one. Want to chat? Join me on Discord https://discord.gg/Pc8HG9x