17

I would like to bring my CouchDB instance back to admin party. It is running on localhost, so it is not a security concern. I don't want to reinstall it because I have some databases up and running I'd like to keep.

I tried commenting out the admin user in my local.ini:

[admins]
#admin = -hashed-xxxxxx

I also deleted all the non-design documents from my _users database.

The main goal I have for wanting to go back to the admin party is to be able to create databases without authentication.

What can I do to go back to the admin party? Alternatively how can I setup my instance such that an anonymous user can create and delete databases?

Armand
  • 23,463
  • 20
  • 90
  • 119
David V
  • 11,531
  • 5
  • 42
  • 66

2 Answers2

18

# is not a valid comment in this configuration format, Use ; instead.

If you try to login as #admin (rather than just admin) it will let you, if you give the right password. So, either remove the line altogether, or prefix it with ;.

Dominic Barnes
  • 28,083
  • 8
  • 65
  • 90
9

You can also do that through CouchDB Web UI.

  1. Go to the configuration panel (http://127.0.0.1:5984/_utils/config.html in CouchDB 1.x or http://127.0.0.1:5984/_utils/#_config in CouchDB 2.x).
  2. In the admin section, delete all rows.
  3. Relax: this is "admin party" again.
Aurélien Bénel
  • 3,775
  • 24
  • 45