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

Comment on: "manual/tutorial/assign-role-to-user.txt"

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • 01112017-cleanup
    • None
    • None

    Description

      I am running mongo 2.6 and when attempting to add a role the command
      db.grantRolesToUser threw an error saying that the command did not exist.

      I ended up stumbling upon another syntax that actually worked (Makes me think your documentation is out of date) Below worked on mongo 2.6.1

      db.runCommand(
      { grantRolesToUser: "remote",
      roles: [

      { role: "readWrite", db: "Venue" }

      ],
      writeConcern:

      { w: "majority" , wtimeout: 2000 }

      } )

      Attachments

        Activity

          People

            Unassigned Unassigned
            bret@cityspark.com Bret Ferrier
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              9 years, 19 weeks, 1 day ago