Reputation: 61
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
Upvotes: 2
Views: 4429
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
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
Reputation: 27485
config.xml
doesn't get written until server is restarted at least once since installation.
Try restarting the Jenkins server.
Upvotes: 1