Thursday, February 12, 2009

Hudson - forget password, reset password

I am avid Hudson user and have used it since it first released. It is a pretty cute CI server. I really love it and am very satisfied with using it. Thanks for saving me from the CruiseControl hell.

Today, I got a problem with Hudson because I forget my password. I think Hudson can send me my password, like many portals do. But with the version 1.226 I used, this feature is just missing. It’s okay, hope it is only “not yet implemented” :-). Then I begin googling and find a dangerous solution from the Hudson dashboard: Help! I locked myself out!

The drawback of this solution is that the Hudson is totally unprotected while the <useSecurity> is set to be false. Well, actually, if you use the “Hudson’s own user database” and “Matrix-based security” authorization setting, there are two better ways for the admin to solving this problem.

The first one: edit the authorization setting in the config.xml file if you have defined more users in your Hudson and you at least one user’s password. For example, your user name called peter and you know the password of the user jack, in this case, just open the %HUDON_HOME%/config.xml and find the line:


And add a new line below:


Save your change and restart your Hudson server, then you can login as jack and change your own password. After then login using your own account and go to http://<your>/hudson/configure and change jack back to his normal authorization setting.

The other way ist just editing your own config.xml, in this case, open %HUDON_HOME%/<your>/config.xml and find the line:


The text between the password tag is encoded, so you can’t just enter your password as plain text here. The easy way for you now is just remove all the text between that tag, in another word, just let the password empty.

Save your change and restart the Hudson sever, now you can login yourself without password. Please don’t forget to set your password. You can do it by clicking people -><you> -> configure, or (if you are admin) Manage Hudson -> Manage Users -> then edit the appropriate user account.

The second solution can also be used by the admin for reset the password of normal users.


David W. said...

You forgot another method: Delete yourself from the $HUDSON_HOME/users directory.

This lets you recreate yourself as a user. Once you've recreated yourself as a user, you're an administrator since you already exist in the Hudson $HUDSON_HOME/config.xml file as an administrator.

Anonymous said...

Find and download that you need at Rapidshare Search Engine.
Top Site Lists Free Proxy Site Free Download mp3 Michael Jackson song All Michael Jackson Lyrics Hollywood Celebrity Gossip Download Mp3 Gratis download naruto download naruto shippuuden windows 7 activator

enricoGi said...

Thanks dude, you saved my life, was playing with hudson security when I got a message: "xxx is missing the Read permission"
Therefore I followed your suggestion, set the useSecurity to false.
After this I am able to use hudson :)

Wiggles said...

Thank you!
I was setting up Hudson, and after saving my configuration, was unable to login. Adding to the frustration was that there is a issue with moving up to ubuntu 11.04.
I appreciate your post sharing this useful information!


David Jones said...

Hi, Great.. Tutorial is just awesome..It is really helpful for a newbie like me..
I am a regular follower of your blog. Really very informative post you shared here.
Kindly keep blogging. If anyone wants to become a Front end developer learn from Javascript Training in Chennai .
or Javascript Training in Chennai.
Nowadays JavaScript has tons of job opportunities on various vertical industry. ES6 Training in Chennai