Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCS-5558

Comment on: "manual/reference/command/createRole.txt"

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: Major - P3 Major - P3
    • 01112017-cleanup
    • None
    • None

    Description

      hello,

      I've installed mongodb step by step as it been instructed in your website but when it comes to commands and roles and many other permission and scripts it doesn't work as it been described in website documents.

      as an example here:
      use admin
      switched to db admin
      > db.runCommand({ createRole: "myClusterwideAdmin",
      privileges: [
      { resource:

      { cluster: true }

      , actions: [ "addShard" ] },
      { resource:

      { db: "config", collection: "" }

      , actions: [ "find", "update", "insert", "remove" ] },
      { resource:

      { db: "users", collection: "usersCollection" }

      , actions: [ "update", "insert", "remove" ] },
      { resource:

      { db: "", collection: "" }

      , actions: [ "find" ] }
      ],
      roles: [

      { role: "read", db: "admin" }

      ],
      writeConcern:

      { w: "majority" , wtimeout: 5000 }

      })

      and i keep receving,

      "ok" : 0,
      "errmsg" : "no such cmd: createRole",
      "bad cmd" : {
      "createRole" : "myClusterwideAdmin",

      i'd really appreciate some help here.

      Thank you

      Attachments

        Activity

          People

            kay.kim@mongodb.com Kay Kim (Inactive)
            xgen-internal-docs Docs Collector User (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              8 years, 37 weeks ago