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

mongo 2.4 USer privileges Roles to do a 'show dbs'

    • Type: Icon: Question Question
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 2.4.4
    • Component/s: Security
    • Labels:
      None
    • Environment:
      mongo 2.4 on ubuntu 12.04 LTS

      Hi,

      as ther SERVER-9301, i've done the sames roles on my replicaset like this :

      CSP:PRIMARY> db.addUser(

      { user: "csp_ro", pwd: "csp_ro", roles: [ "readWrite","clusterAdmin" ] }

      )
      {
      "user" : "csp_ro",
      "pwd" : "bdf8745d1e16d25bfc035bbb6e703a78",
      "roles" : [
      "readWrite",
      "clusterAdmin"
      ],
      "_id" : ObjectId("525faffaf8039187dd745e01")
      }
      CSP:PRIMARY>
      bye
      root@mongo21g:~# mongo -ucsp_ro -pcsp_ro CSP2
      MongoDB shell version: 2.4.4
      connecting to: CSP2
      > show dbs
      Thu Oct 17 11:38:15.315 JavaScript execution failed: listDatabases failed:

      { "ok" : 0, "errmsg" : "unauthorized" }

      at src/mongo/shell/mongo.js:L46

      But the user csp_ro doesn't have roles to do a show dbs. Is it Normal?

            Assignee:
            rassi J Rassi
            Reporter:
            moyjunior MOISAN Benoît
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: