How do I start jenkins as an admin without having the need of entering credentials

0 votes

While installing jenkins I forgot to create users and launched it as admin for the first time. But the problem now is when I try to run it, it asks me for a username and password. What should I do now?

enter image description here

enter image description here

Aug 22, 2018 in Jenkins by DareDev
• 6,890 points
7,986 views

2 answers to this question.

0 votes
Best answer

I found a way around:

  • Go to /Users/Username/.jenkins/
  • Open config.xml and remove the highlighted security tags
  • Open config.xml and remove the following code
  <useSecurity>true</useSecurity>
  <authorizationStrategy class="hudson.security.FullControlOnceLoggedInAuthorizationStrategy">
    <denyAnonymousReadAccess>true</denyAnonymousReadAccess>
  </authorizationStrategy>
  <securityRealm class="hudson.security.HudsonPrivateSecurityRealm">
    <disableSignup>true</disableSignup>
    <enableCaptcha>false</enableCaptcha>
  </securityRealm>
  • Now it works without any authentication
answered Aug 22, 2018 by DareDev
• 6,890 points
0 votes

The JENKINS_HOME organizer contains a document named config.xml. At the point when security is empowered, this record contains an XML component named useSecurity that will be set to true.

By changing this setting to false, security will be handicapped whenever Jenkins is restarted. <useSecurity>false</useSecurity> 

The incapacitating security ought to dependably be both a final retreat and a brief measure. When any conformation issues are settled, make certain to re-empower Jenkins security and reboot the CI server.

Folow the steps below :

  • Go to $JENKINS_HOME in the file system and discover the config.xmldocument.

  • Open this document in the editorial manager.

  • Search for the <useSecurity>true</useSecurity> component in this document.

  • Supplant true with false

  • Expel the components authorization strategy and security realm

  • Start Jenkins

At the point when Jenkins returns, it will be in an unsecured mode where everybody gets full access to the framework. 

answered Aug 13, 2019 by Sirajul
• 59,230 points

Related Questions In Jenkins

0 votes
1 answer

How do I pass value from my Fake # script to the host build server (Jenkins)

You can use the EnvInject plugin to pass environment ...READ MORE

answered Jul 11, 2018 in Jenkins by Kalgi
• 2,680 points
1,387 views
0 votes
2 answers

How do I start jenkins on my Virtual Machine?

To start the Jenkins server please follow ...READ MORE

answered Dec 17, 2018 in Jenkins by Arohi
8,760 views
0 votes
1 answer

how can you temporarily turn off the jenkins security when the adminstrators have locked out of the admin consoles?

The JENKINS_HOME organizer contains a document named ...READ MORE

answered Aug 7, 2019 in Jenkins by Sirajul
• 59,230 points
2,536 views
+15 votes
2 answers

Git management technique when there are multiple customers and need multiple customization?

Consider this - In 'extended' Git-Flow, (Git-Multi-Flow, ...READ MORE

answered Mar 27, 2018 in DevOps & Agile by DragonLord999
• 8,450 points
4,060 views
+2 votes
1 answer
0 votes
2 answers
0 votes
1 answer

any way to integrate Jenkins with ServiceNow?

Now, there is no official servicenow support ...READ MORE

answered Apr 10, 2018 in Jenkins by DareDev
• 6,890 points
4,931 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP