Both of these tools have the following output in their --help string:
--authenticationDatabase arg user source (defaults to dbname)
I interpret this instruction as having two possible meanings (neither of which work):
- dbname could refer to another command-line parameter. But there is no such other parameter to these two tools. The tools perform a global function so a default database has no meaning.
- dbname could mean the literal string "dbname". If I create a user/pass for a database named "dbname" it works when I specify it as the --authenticationDatabase but not if I leave that parameter out.
I am forced to conclude that --authenticationDatabase is actually a required parameter for these two tools when authentication is enabled.
If there is a default database to auth against, I have not been able to find it. "admin" does not work. "test" does not work. "dbname" does not work.
The help output for these two tools should be adjusted and a sensible default should be given (or auth param made mandatory).