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

Comment on: "manual/reference/method/db.createUser.txt"

    XMLWordPrintableJSON

Details

    Description

      This example seems to be wrong:

      use products
      db.createUser( { "user" : "accountAdmin01",
      "pwd": "cleartext password",
      "customData" :

      { employeeId: 12345 }

      ,
      "roles" : [

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

      ,

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

      ,
      "readWrite"
      ] },

      { w: "majority" , wtimeout: 5000 }

      )

      Notice the quotes around user, pwd, customData, and roles.

      Attachments

        Activity

          People

            Unassigned Unassigned
            xgen-internal-docs Docs Collector User (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              7 years, 39 weeks, 1 day ago