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

db.changeUserPassword() parameters are incorrect in documentation

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • Server_Docs_20231030
    • None
    • manual
    • None
    • 0.2

    Description

      https://docs.mongodb.com/v3.2/reference/method/db.changeUserPassword/

      Parameters are listed as username, password, mechanism, and digestPassword, but the shell disagrees.

      MongoDB shell version: 3.2.9
      connecting to: test
      > db.changeUserPassword
      function (username, password, writeConcern) {
      this.updateUser(username,

      {pwd: password}

      , writeConcern);
      }

      I checked previous versions and this is the code all the way back to 2.6.9. The code was slightly different in 2.4.14 as it didn't include the writeConcern parameter.

      Please correct the function definition to remove mechanism and digestPassword parameters and add the writeConcern parameter.

      Attachments

        Activity

          People

            stephen.steneker@mongodb.com Stennie Steneker (Inactive)
            james.kovacs@mongodb.com James Kovacs
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              6 years, 18 weeks ago