How do I login to Jenkins when I locked myself out?


  • When managing user permissions, a user might set a permission wrong and lose access when using their main administrator account. Regaining access can be done in a few steps.
  • global security needs to be changed, unable to login as administrator


  • CloudBees Jenkins Enterprise
  • CloudBees Jenkins Operations Center


1) Edit the config.xml file in the JENKINS_HOME folder and locate this line:


Set the value to false

2) Start Jenkins

From there you should be able to toggle security back on from the UI and then correct any permission problems that caused the problem, normally this happens with role based matrix.

Have more questions?


  • 0
    Namrata Shilpi

    I'm using LDAP plugin for login. Everytime I restart my Jenkins Master I need to 'Edit the config.xml file in the JENKINS_HOME' and reconfigure my LDAP settings from scratch. Is there a way to avoid this cumbersome process?

    Edited by Namrata Shilpi
  • 0
    Denys Digtiar

    Hi Namrata,

    This should not be necessary if Jenkins is operating normally. If you are a CloudBees customer, feel free to raise a support ticket so that we can help you troubleshoot the issue.

Please sign in to leave a comment.