Skip to content

Instantly share code, notes, and snippets.

@gmhawash
Created November 9, 2012 01:54
Show Gist options
  • Save gmhawash/4043232 to your computer and use it in GitHub Desktop.
Save gmhawash/4043232 to your computer and use it in GitHub Desktop.
Reset jenkins password
0. SSH to server
1. Edit /opt/bitnami/apps/jenkins/jenkins_home/config.xml
2. set userSecurity to false: <userSecurity>false</userSecurity>
3. delete
<authorizationStrategy> and <securityRealm>
4. /etc/init.d/bitnami restart
Now Jenkins should be open:
5. Select Configure Jenkins,
"Enable Security",
"Use Jenkin's own database"
"Allow users to sign up"
6. Under Authorization, select: "Matrix-based security"
and add users and give them all permissions,
and remove all permissions from 'anonymous'
@armandomiani
Copy link

refer:
http://stackoverflow.com/questions/6988849/reset-jenkins-configuration-command-line
One other way would be to manually edit the configuration file for your user (e.g. /var/lib/jenkins/users/username/config.xml) and update the contents of passwordHash:

#jbcrypt:$2a$10$razd3L1aXndFfBNHO95aj.IVrFydsxkcQCcLmujmFQzll3hcUrY7S
Once you have done this, just restart Jenkins and log in using this password:
test

👍 worked fine! But... do you happen to know how this string is formed? :) Thanks!

@elaltodelgrupo
Copy link

Hi,

and jenkins OS user generate on installation. Can i change his password without post-problems?
Thanks in advance

--

Ed. #allways learning

@Dalu61
Copy link

Dalu61 commented Jul 12, 2024

worked like a charm, thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment