[DOCS-15395] [TOOLS] mongorestore error when trying to use password prompt for LDAP user Created: 06/Jun/22  Updated: 08/Jan/24  Resolved: 06/Dec/23

Status: Closed
Project: Documentation
Component/s: tools
Affects Version/s: None
Fix Version/s: Server_Docs_[20240108]

Type: Task Priority: Major - P3
Reporter: Anonymous Assignee: Caleb Thompson
Resolution: Gone away Votes: 0
Labels: bug, bugfix
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Documented
documents TOOLS-2963 Tools are not prompting for a passwor... Closed
Participants:
Days since reply: 9 weeks ago

 Description   

Explain how can we use LDAP authentication with password prompt in order to avoid writing it in the command please ?

Engineering Description
Hi Team,

When I try to using mongorestore/mongodump in CLI with password prompt and a LDAP user, the following error is thrown :

 
error parsing command line options: password required for PLAIN
 

In [the mongodb documentation|mongorestore — MongoDB Database Tools] we can read : 

To prompt the user for the password, pass the --username option without --password or specify an empty string as the --password value, as in --password="" .

I tried the following command without password argument or with --password="" but each time I got the same error :

????mongorestore -u "$USER" -password="" --authenticationDatabase '$external' --authenticationMechanism 'PLAIN' --db $DB $DB_DIR

 

How can I use LDAP authentication with password prompt in order to avoid writing it in the command please ?

I'm using MongoDB v4.4.5-7 on Ubuntu 18.04.5 LTS.

Thanks you beforehand.

Best Regards.

Lucas



 Comments   
Comment by Caleb Thompson [ 06/Dec/23 ]

This was an issue with tools (https://jira.mongodb.org/browse/TOOLS-2963) and the docs are correct. 

Generated at Thu Feb 08 08:12:46 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.