19

I enabled jenkins security thinking it would prompt me to create an account. I tried deleting and editing my config.xml file in c:/program files/jenkins but i'm not sure how to restart jenkins without having access.

Any help would be appreciated.

I'm running Jenkins on a windows server, recently updated to the latest version.

Dreamwalker
  • 2,989
  • 4
  • 27
  • 60
sstynes
  • 237
  • 1
  • 3
  • 8

3 Answers3

22

If you don't have a lot of other configuration that you'd like to save, you can just delete %JENKINS_HOME%/config.xml and restart Jenkins to disable security.

Otherwise, edit config.xml and set the values inside the <useSecurity> tags to false, then restart Jenkins.

Arpit Aggarwal
  • 21,748
  • 13
  • 80
  • 99
gareth_bowles
  • 19,908
  • 5
  • 52
  • 79
  • i tried deleting the config.xml in c:/program files/jenkins/ and restarting the jenkins service in windows but i was still locked out. – sstynes May 01 '13 at 19:04
  • 5
    In addition I had to remove the authorizationStrategy and securityRealm elements. See: https://wiki.jenkins-ci.org/display/JENKINS/Disable+security – akiraspeirs Jun 15 '15 at 23:36
4

I had this exact issue today on my windows jenkins server.

Just removing the xml file and restarting did not work for me either. I had to:

  • Stop the service.
  • Check taskmanager to ensure the process is gone.
  • Either edit the Config.XML file and change the useSecurity false or delete the config.xml file.
  • Now start the service again
Stuart Whelan
  • 385
  • 2
  • 9
1

You can try: How to restart Jenkins manually? or kill the process in taskmanager or do a taskkill in windows shell.

Here are the instructions to restart from command line:

Open Command Prompt.

Type one of the following: without qoutes

To stop a service, type:

net stop 'service'

To start a service, type:

net start 'service'

Also I think you may be looking in the wrong folder. Do you have a config.xml in

C:\Users\yourUserName\.jenkins?
Community
  • 1
  • 1
PirateDave
  • 143
  • 1
  • 2
  • 10