Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Yes basicly you can connect without authentication but cannot do nearly anything. you can run <code>db.serverBuildInfo()</code></p> <p><code>db.version()</code> </p> <p><code>db.adminCommand({ping:1})</code> </p> <p><code>db.adminCommand({whatsmyuri:1})</code></p> <p><code>db.adminCommand({features:1})</code></p> <p>for example, maybe some other commands. </p> <p>Which is seems a bit pain for me is that able to run:</p> <pre><code>for(var i=0;i++&lt;20000;){db.adminCommand({forceerror:1})} </code></pre> <p>Which generates a bit of log.</p> <p>I checked out the sources, and you can see this behaviour is kind of bug. The sources of the shell startup are in : <a href="https://github.com/mongodb/mongo/blob/master/src/mongo/shell/dbshell.cpp" rel="nofollow">https://github.com/mongodb/mongo/blob/master/src/mongo/shell/dbshell.cpp</a></p> <p>Basicly there are two type of test running against the parameter values given in password and username arguments for mongoshell. The startup checks when you provided a --password parameter and have not wrote a password after. And there is a check when you have not specified to start without db, and you have specified a username which is longer than 0 than it will try to authenticate (check line 1043) </p> <p><code>if (!nodb &amp;&amp; username.size())</code> . </p> <p>But that is all. If you not specify credentials at all, it seems will connect without even try to authenticate. I guess in the initialization phase it should be checked weather the process where we connect is running with authentication and force out authenicaion if it needed. </p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload