[DOCS-10055] Sample commands should quote the password value Created: 29/Mar/17  Updated: 11/Apr/17  Resolved: 11/Apr/17

Status: Closed
Project: Documentation
Component/s: Atlas
Affects Version/s: None
Fix Version/s: v20170418

Type: Task Priority: Major - P3
Reporter: William Byrne III Assignee: Kay Kim (Inactive)
Resolution: Done Votes: 0
Labels: atlas-docs
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Linux, MacOS, ... all I think.


Issue Links:
Related
Participants:
Days since reply: 6 years, 44 weeks, 1 day ago

 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.



 Comments   
Comment by Kay Kim (Inactive) [ 11/Apr/17 ]

git commit:
https://github.com/10gen/cloud-docs/commit/c30662a464008336d6c94a9c3dc4c36da5364c66

Generated at Thu Feb 08 07:59:43 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.