Alex Rivera | Logout

How do I reset a user password in hudson?

Asked 2011-10-25T14:15:12.880
8

I've lost the admin user password on hudson (actually it just randomly stopped working), I can get back in by disabling security (editing ~/.hudson/config.xml) then I can configure hudson, but I can't find any options to add new users or change/reset user passwords - maybe these options don't appear when security is disabled? I was using the matrix-based security. How can I add a new user or reset the password for existing ones?

Edit
Report

1 Answer

11

Here is an article outlining how that is achieved.

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 %HUDSON_HOME%/config.xml and find the line:

<permission>Hudson.model.Hudson.Administer:peter</permission>

And add a new line below:

<permission>Hudson.model.Hudson.Administer:jack</permission>

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 %HUDSON_HOME%/your/config.xml and find the line:

<password>………</password>

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.

Hope this helps.

answered 2011-10-25T15:47:12.930

Your Answer