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

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 2.0.0-rc0
    • Affects Version/s: None
    • Component/s: Sharding
    • None
    • ALL

      • 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.

            Assignee:
            kristina Kristina Chodorow (Inactive)
            Reporter:
            bernie@mongodb.com Bernie Hackett
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: