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

can not authenticate an admin user

    • Type: Icon: Question Question
    • Resolution: Done
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: 2.0.4
    • Component/s: Admin
    • Labels:

      My question might be stupid, but I am very new to mongodb. An admin ID was created by our mongodb administrator. The id ex. is("george","password")

      on mongos server:
      I log in
      use admin
      db.auth("george","password");
      get 1
      no problem

      db.system.users.find()

      { "_id" : ObjectId("4f6b4a667f1a1c7f7842bee0"), "user" : "george", "readOnly" : false, "pwd" : "d962c58450d4df2a3eb94b944e292bde" }

      can run commands
      show dbs
      show collections
      printShartingStatus etc.

      of cource the db.printReplicationInfo() can not be run here. I need to go down to my replica set
      servers(6 of them) and run it, but I can not get authentiacated on those.

      connecting to: 127.0.0.1:27018/test
      > use admin
      switched to db admin
      > db.auth("george","password")
      0
      show dbs
      Thu Mar 22 16:37:30 uncaught exception: listDatabases failed:

      { "errmsg" : "need to login", "ok" : 0 }

      PS _ We use a keyFile

      What am I doing wrong here.
      Appreciate your help.

            Assignee:
            adamc Adam Comerford
            Reporter:
            gnikopo George Nikopoulos
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: