Yesterday I created an instance of Jenkins on Docker so that I could package up all the pre-requisites for the HPE Automation Tools plugin. I need to do this periodically due to the fact that my Jenkins instance at work isn’t connected to the internet and I occasionally need to download new and updated plugins.
I built Jenkins yesterday and presumably used one of my “disposable” passwords for the admin account in this Jenkins instance. I tried “password”, “admin”, “password1” and a few others but I couldn’t remember the password that I set only yesterday !
I decided that I needed to “hack” Jenkins. This was easier said than done because although I found the location for the password in the config files, the password is hashed out (unsurprisingly).
\jenkins\var\jenkins_home\users\admin\config.xml
Rather than remove the password entirely and risk breaking Jenkins, I had a mooch about in some other config files.
\jenkins\var\jenkins_home\config.xml
By changing the <useSecurity> flag to false and restarting Jenkins,I can avoid the password prompt altogether.