[chef] Re: Re: Server: Resetting admin password when it's lost


Chronological Thread 
  • From: Edward Sargisson < >
  • To:
  • Subject: [chef] Re: Re: Server: Resetting admin password when it's lost
  • Date: Thu, 25 Aug 2011 16:50:17 -0700

Hi Noah,

Thanks for that. I have finally gotten back in. :-)

For reference:
I couldn't connect to that server from my desktop on port 5984 because
of firewall problems.
I tried to use Lynx but it wasn't listing the databases I needed.
I looked up the REST api and used CURL to dig in and find it.

Commands:
curl http://localhost:5984/chef/_design/users/_view/all
Returns all the users e.g.
"total_rows":1,"offset":0,"rows":[
{"id":"74609467-a73e-4b77-a2cd-253c0fbb05f9","key":"admin","value":{"_id":"74609467-a73e-4b77-a2cd-253c0fbb05f9","_rev":"2-a7ba02e0ab036580d80907c38b6d831f","salt":"Thu
Aug 25 23:25:37 +0000
2011NBiJrE1vF5kzG6fKXDNEEB6IyX8OgM","name":"admin","json_class":"Chef::WebUIUser","admin":true,"openid":null,"password":"d337ca104bbed6e90c87aa43f6c0d2ab88414e2f","chef_type":"webui_user"}}
]}

To delete the user:
curl -X DELETE 
http://localhost:5984/chef/74609467-a73e-4b77-a2cd-253c0fbb05f9?rev=2-a7ba02e0ab036580d80907c38b6d831f

Then you restart your chef-server and chef-server-webui.

The default password is in /etc/chef/webui.rb (not server.rb).

Cheers,
Edward


On Mon, Aug 15, 2011 at 5:06 PM, Noah Kantrowitz 
< >
 wrote:
> If you go in to CouchDB's web UI and delete the user named admin it will be 
> recreated the next time the server starts (using the password in the config 
> file).
>
> --Noah
>
> On Aug 15, 2011, at 3:11 PM, Edward Sargisson wrote:
>
>> Hi all,
>> I've been mucking around with chef-server - and then forgot the one
>> and only admin password.
>>
>> Is there a way of resetting it from the back end or shall I just 
>> re-install?
>>
>> Thanks,
>> Edward
>
>



Archive powered by MHonArc 2.6.16.

§