To
reset the jenkins admin password,You can simply disable the security
in the config.xml file.
If your jenkins is running on the Linux OS, edit the below file.
vim
/var/lib/jenkins/config.xml
Note:
you can use you favourite text editor in place Vim
Search for the word <useSecurity>true</useSecurity>
Save The file
- Restart the Jenkins server.
There are few ways to restart your Jenkins server
To
restart Jenkins manually,
(jenkins_url)/safeRestart
-
Allows all running jobs to complete. New jobs will remain in the queue to run after the restart is complete
(jenkins_url)/restart
-
Forces a restart without waiting for builds to complete.
$
/etc/init.d/jenkins
restart
$
service
jenkins restart
Now go to the Jenkins portal again and Jenkins will not ask any credentials this time. You navigate to "Manage Jenkins" to set the administrator password again.
Enable the security again by changing settings to <useSecurity>true</useSecurity> and restart the Jenkins again.
DONE
No comments:
Post a Comment