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

mongorestore error when trying to use password prompt for LDAP user

    XMLWordPrintable

    Details

    • Type: Investigation
    • Status: Accepted
    • Priority: Minor - P4
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: 100.6.0
    • Component/s: mongorestore
    • Labels:
      None
    • Documentation Changes:
      Needed
    • Documentation Changes Summary:
      Explain how can we use LDAP authentication with password prompt in order to avoid writing it in the command please ?
    • Branch:
      v4.4

      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

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            lucas@fitnetmanager.com Lucas LAMY
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated: