couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joe Williams <...@joetify.com>
Subject Re: Adding users through http
Date Thu, 03 Sep 2009 18:30:21 GMT

Eric,

I think you should be able to add an admin user using the following
curl:

curl -X PUT http://HOSTNAME:5984/_config/admins/USERNAME -d '"PASSWORD"'


-Joe




On Thu, 03 Sep 2009 13:44:32 -0400
eric casteleijn <eric.casteleijn@canonical.com> wrote:

> I have been struggling with this for a few hours, I googled around,
> and looked in the testcases, but I can't seem to get it to work:
> 
> What is the correct way of adding a user through http, and what is
> the correct way of granting that user an admin role?
> 
> The first surprise is that it seems to be:
> 
> curl -X POST -d "username=thisfred2&password=password" 
> http://localhost:5984/_user
> 
> rather than a JSON body. At least, this was suggested to me, and
> works, or at least returns {"ok": "true"} (note the JSON) when the
> user doesn't already exists.
> 
> How do I now create an admin user, or make an existing user an admin?
> 
> I think I'm just missing a few pieces of the puzzle, but perhaps
> since it's a very small puzzle with not very many pieces to begin
> with, this has me completely stumped.
> 


-- 
Name: Joseph A. Williams
Email: joe@joetify.com
Blog: http://www.joeandmotorboat.com/

Mime
View raw message