oonoroo
oonoroo

Reputation: 61

How to disable security checking in Jenkins?

In any answer and in jenkins website tell me to set

<useSecurity>true</useSecurity>

in config.xml but in my jenkins folder don't have this file

list of file in /var/lib/jenkins

Upvotes: 2

Views: 4429

Answers (3)

Aditya
Aditya

Reputation: 458

Today I messed up on my jenkins server in RBAC so I went to /var/lib/jenkins/config.xml file and reverted changes as I mistakenly added developer role for overall and reverted back to admin

before doing changes in config file stop the server
systemctl stop jenkins

Upvotes: 0

kenorb
kenorb

Reputation: 166399

This likely sounds like invalid Jenkins installation, or the file is in another place pointed by $JENKINS_HOME or $CATALINA_OPTS (e.g. ~/.jenkins or /var/usr/jenkins/.jenkins).

Another reason could be that by default Jenkins load all data from memory and you need to reload the configuration files from file system, so try restarting Jenkins.

Then double check in System Properties (at /systemInfo) that user.home points to the folder where you expect that file. Check also your System Log (/log/all) for any issues.

If above won't help, check the folder permission and if there is enough space (but you should have some error anyway). Or try reinstalling Jenkins.

According to Administering Jenkins documentation page, the config.xml Jenkins root configuration should be always in your JENKINS_HOME folder.


Once you've got config.xml, to disable security remove the lines with useSecurity and authorizationStrategy and restart Jenkins, or try executing these commands:

sudo ex +g/useSecurity/d +g/authorizationStrategy/d -scwq /var/lib/jenkins/config.xml
sudo /etc/init.d/jenkins restart

Upvotes: 2

Slav
Slav

Reputation: 27485

config.xml doesn't get written until server is restarted at least once since installation.

Try restarting the Jenkins server.

Upvotes: 1

Related Questions