Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-3619

mongostat can't authenticate to mongos using -u -p or the long name equivalents

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.0.0-rc0
    • Component/s: Sharding
    • Labels:
      None
    • Operating System:
      ALL

      Description

      • Start up a small sharded cluster with authentication.
      • Add an admin user and make sure that user can authenticate
      • Run mongostat -u <user> -p <password>

      Here's and example of what happens:

      $ mongostat -u theadmin -p mypassword
      connected to: 127.0.0.1
      error:

      { ok: 0.0, errmsg: "unauthorized" }

      $ mongostat --username theadmin --password mypassword
      connected to: 127.0.0.1
      error:

      { ok: 0.0, errmsg: "unauthorized" }

      $ mongo
      MongoDB shell version: 2.0.0-rc0-pre-
      connecting to: test
      > use admin
      switched to db admin
      > db.auth('theadmin', 'mypassword')
      1

      Maybe I'm missing something obvious.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: