title: "db.createUser is not a function" and "password can't be empty"
body: <p>I am trying to setup the authentication on MongoDB. I've uncommented <code>auth=true</code> in configuration file and restarted the server. The first connection via <strong>mongo</strong> was rejected. The second one (immediately after the first one) went through and I got this in the logs:</p>
  
  <pre><code>Sat Apr 12 14:56:46 [initandlisten] connection accepted from 127.0.0.1:44001 #1
  Sat Apr 12 14:56:46 [conn1] note: no users configured in admin.system.users, allowing localhost access
  </code></pre>
  
  <p>While in console, I am able to execute commands, however if I try to follow any of the numberous tutorials (including the official ones), I get either <code>db.createUser is not a function</code> when executing <code>db.createUser()</code> or <code>password can't be empty</code> when executing <code>db.addUser()</code>:</p>
  
  <p><img src="https://i.stack.imgur.com/lW2T4.png" alt="Mongo output"></p>
  
  <p>The object which I am passing is:</p>
  
  <pre><code>{
      user: "username",
      pwd: "passphrase",
      roles: [ 
          { 
              role: "userAdminAnyDatabase", 
              db: "admin" 
          }
      ]
  }
  </code></pre>