Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-32421

Mongo is not accepting password as a parameter

    • Type: Icon: Bug Bug
    • Resolution: Gone away
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 3.2.11
    • Component/s: Shell
    • None
    • Environment:
      Debian 9.3 x64
    • Fully Compatible
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      While connecting to MongoDB 3.2 via "mongo" from Debian 9 shell it seems that the password can only be typed manually after being promted for it. Example:

      mongo hostname:port/database -u username -p

      The goal, however, is for the user to be able to pass the password along with other parameters. Example:

      mongo hostname:port/database -u username -p password

      Repro steps:

      • install Debian 9
      • install MongoDB 3.2 using Debian packages
      • add some user to MongoDB
      • enable authentication in config file
      • restart MongoDB
      • try connecting

      Expected result:

      • User is able to pass the password along other connection parameters and is able to login successfully.

      Actual result:

      • User is still prompted for password despite already passing it with other parameters.
      • The problem does not occur for Debian 8 and MongoDB 2.4.
      • The problem does not occur for Debian 9 and MongoDB 3.2 when using mongodump / mongorestore.

      According to the documentation, passing password as a parameter is possible, so what's going on here?
      https://docs.mongodb.com/v3.2/reference/program/mongo/

            Assignee:
            adam.martin@mongodb.com ADAM Martin (Inactive)
            Reporter:
            t.jones t.jones
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: