Uploaded image for project: 'MongoDB Database Tools'
  1. MongoDB Database Tools
  2. TOOLS-504

mongotools needs to be able to read password from something other than command line flags

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.0.2, 3.1.1
    • Component/s: All Tools
    • Labels:
      None
    • Environment:
      windows
    • Case:
    • Backport Requested:
      v3.0

      Description

      To reproduce, launch a mongod instance with a username / password (jim and password in this case).

      UNIX session

       
      $ cat << EOF > password.json
      heredoc> password
      heredoc> { "_id" : { "$oid" : "54898ddc31e8ec20a062acae" } }
      heredoc> { "_id" : { "$oid" : "54898ddc31e8ec20a062acaf" } }
      heredoc> { "_id" : { "$oid" : "54898ddc31e8ec20a062acb0" } }
      heredoc> { "_id" : { "$oid" : "54898ddc31e8ec20a062acb1" } }
      heredoc> { "_id" : { "$oid" : "54898ddc31e8ec20a062acb2" } }
      heredoc> { "_id" : { "$oid" : "54898ddc31e8ec20a062acb3" } }
      heredoc> { "_id" : { "$oid" : "54898ddc31e8ec20a062acb4" } }
      heredoc> { "_id" : { "$oid" : "54898ddc31e8ec20a062acb5" } }
      heredoc> { "_id" : { "$oid" : "54898ddc31e8ec20a062acb6" } }
      heredoc> EOF
       
      $ mongoimport --drop --db my_cms --collection docs --username jim --password --authenticationDatabase admin < password.json
      connected to: 127.0.0.1
      Enter password:
      Fri Dec 12 11:02:05.917 dropping: my_cms.docs
      Fri Dec 12 11:02:05.921 imported 9 objects
       

      Windows session

      C:\jim>mongoimport --host XX.XX.XX.XXX -username jim --password  --authenticationDatabase admin --db my_cms --collection docs < password.json
      connected to: 10.7.31.244
      Enter password: Cannot get console mode 6
      assertion: 18 { code: 18, ok: 0.0, errmsg: "auth fails" }
       

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              kyle.erf Kyle Erf
              Reporter:
              jim.oleary James O'Leary
              Votes:
              3 Vote for this issue
              Watchers:
              8 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: