Dec 18, 2013

Not able to login Jenkins ? Locked yourself by messing security ? How to disable security in Jenkins

Rarely we end up locking ourself in jenkins so that we couln't login Jenkins.


For example -

If you enable security before creating an account, you end up being access denied with out any login account in hand.
























Jenkins throws error like

javax.servlet.ServletException: hudson.security.AccessDeniedException2: anonymous is missing the Overall/Administer permission

This can be solved by editing the config.xml  and disabling the security by changing

<useSecurity>true</useSecurity>

into 

<useSecurity>false</useSecurity>

You can refer this url from Jenkins - https://wiki.jenkins-ci.org/display/JENKINS/Disable+security



1 comment:

  1. I repalced the war file with new latest Jenkins war. On restarting I am looking at the new jenkins(which I eventually messed as shown in pic above). Now to resolve this I searched everywhere and finally found config.xml, enable its write privileges and changed the security to false, but this was old jenkins' config.xml file. I am sure because I am seeing its version. Where is latest version's config.xml file. On executing $ echo JENKINS_HOME , it give nothing
    Where is NEW Jenkins's home folder, for previous version it was /var/lib/jenkins which I renamed to Jenkins.Old. Please let me know how I can fix this. I can take risk to remove it completely(which I have almost done by renaming /var/lib/jenkins to /var/lib/jenkins.old )

    ReplyDelete