Return-Path: Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: (qmail 72744 invoked from network); 3 Sep 2009 17:45:07 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 3 Sep 2009 17:45:07 -0000 Received: (qmail 43990 invoked by uid 500); 3 Sep 2009 17:45:06 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 43925 invoked by uid 500); 3 Sep 2009 17:45:06 -0000 Mailing-List: contact user-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@couchdb.apache.org Delivered-To: mailing list user@couchdb.apache.org Received: (qmail 43915 invoked by uid 500); 3 Sep 2009 17:45:06 -0000 Delivered-To: apmail-incubator-couchdb-user@incubator.apache.org Received: (qmail 43911 invoked by uid 99); 3 Sep 2009 17:45:06 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 03 Sep 2009 17:45:06 +0000 X-ASF-Spam-Status: No, hits=0.5 required=10.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS,WEIRD_PORT X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [91.189.90.139] (HELO adelie.canonical.com) (91.189.90.139) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 03 Sep 2009 17:44:54 +0000 Received: from hutte.canonical.com ([91.189.90.181]) by adelie.canonical.com with esmtp (Exim 4.69 #1 (Debian)) id 1MjGMM-00024k-Hi for ; Thu, 03 Sep 2009 18:44:34 +0100 Received: from c-68-34-107-76.hsd1.md.comcast.net ([68.34.107.76] helo=[192.168.1.6]) by hutte.canonical.com with esmtpsa (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from ) id 1MjGMM-0001XL-Cu for couchdb-user@incubator.apache.org; Thu, 03 Sep 2009 18:44:34 +0100 Message-ID: <4AA00080.5020807@canonical.com> Date: Thu, 03 Sep 2009 13:44:32 -0400 From: eric casteleijn User-Agent: Thunderbird 2.0.0.23 (X11/20090817) MIME-Version: 1.0 To: couchdb-user@incubator.apache.org Subject: Adding users through http Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org 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. -- - eric casteleijn https://launchpad.net/~thisfred http://www.canonical.com