Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Create a new Admin user

    For example, creating a system admin with "anna" as the username and "secret" as the password.

    No Format
    > HOST="http://127.0.0.1:5984"
    
    > curl -X PUT $HOST/_config/admins/anna -d '"secret"'
    ""

    System admin is allowed to do anything to a CouchDB installation.

  2. Confirm that the new system admin has been created successfully

    Without credentials

    No Format
    > curl -X PUT $HOST/somedatabase
    {"error":"unauthorized","reason":"You are not a server admin."}

    With credentials

    No Format
    > HOST="http://anna:secret@127.0.0.1:5984"
    > curl -X PUT $HOST/somedatabase
    {"ok":true}