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

Outdated addUser() example in kerberos documentation

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • mongodb-2.6
    • Affects Version/s: None
    • Component/s: manual
    • Labels:

      On the page "Deploy MongoDB with Kerberos Authentication", there is an example of adding a user to the database for use with kerberos, but the syntax is outdated (as of 2.5.3, I believe). The example is:

      db = db.getSiblingDB("records")
      db.addUser( {
                    "user": "application/reporting@EXAMPLE.NET",
                    "roles": [ "read" ],
                    "userSource": "$external"
                  } )
      

      and should be:

      db = db.getSiblingDB("$external")
      db.addUser( {
                    "user": "application/reporting@EXAMPLE.NET",
                    "roles": [ { "role":"read", db:"records"} ]
                  } )
      

            Assignee:
            bgrabar Bob Grabar
            Reporter:
            luke.lovett Luke Lovett
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              10 years, 23 weeks, 5 days ago