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

Outdated addUser() example in kerberos documentation

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • mongodb-2.6
    • None
    • manual

    Description

      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"} ]
                  } )

      Attachments

        Activity

          People

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

            Dates

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