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

Sample commands should quote the password value

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: v20170418
    • Component/s: Atlas
    • Labels:
    • Environment:
      Linux, MacOS, ... all I think.
    • Last comment by Customer:
      true

      Description

      Customer from https://jira.mongodb.org/browse/MMSSUPPORT-14327 suffered serious delay because he copied the sample mongodump+mongorestore command on the Atlas "Seed with mongorestore" page and replaced the password fields with his values, and he got non-intuitive error messages because his passwords had special characters in them and he didn't wrap them inside single quotes. He wants us to update that page to mention the possible need to quote the username/pw/etc, and the mongorestore/mongodump error message should suggest lack of quotes as a possible reason for failed authentication.

      I suggested that the need to use single quotes to prevent special characters (such as $, @, &, ! in strings (such as such as passwords, usernames, database object identifiers etc) from being interpreted is generic feature of Linux and not specific to using mongodump and mongorestore when importing into Atlas, or to MongoDB used from the command line generally. I didn't want this to open the floodgates to revising every manual page where a string is used on the command line.

      He countered by saying that special characters are likely in passwords (and are mandated by the password rules at some sites), and suggested the sample command include the quotes.
      He pointed out that we quote the admin.system.users argument to --nsExclude.

      He went on to suggest it would be even better and probably more secure to store Atlas credentials in a file, like ~/.mongodb/credentials, similar to what AWS does: http://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-started.html.

      I think replacing -p mySourcePassword with -p 'mySourceP@$$word' and -p atlasPassw0Rd with -p 'atlasP@$$assw0Rd' or similar on that page would be enough, and perhaps consider similar changes on similar pages elsewhere where we have copyable sample commands.

        Attachments

          Activity

            People

            Assignee:
            kay.kim Kay Kim (Inactive)
            Reporter:
            william.byrne William Byrne III
            Participants:
            Last commenter:
            Jonathan Dahl Jonathan Dahl
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Days since reply:
              4 years, 33 weeks, 3 days ago
              Date of 1st Reply: