title: How to remove a user from a MongoDB database
body: <p>I have a database to which I assigned one user that I want to remove right now.</p>
  <p>My commands looks like:</p>
  <pre><code>&gt; show dbs
  admin     0.000GB
  users     0.000GB
  local     0.000GB
  &gt; use admin
  switched to db admin
  &gt; show users
  {
      &quot;_id&quot; : &quot;admin.root&quot;,
      &quot;user&quot; : &quot;root&quot;,
      &quot;db&quot; : &quot;admin&quot;,
      &quot;roles&quot; : [
          {
              &quot;role&quot; : &quot;readWriteAnyDatabase&quot;,
              &quot;db&quot; : &quot;admin&quot;
          },
          {
              &quot;role&quot; : &quot;userAdminAnyDatabase&quot;,
              &quot;db&quot; : &quot;admin&quot;
          },
          {
              &quot;role&quot; : &quot;dbAdminAnyDatabase&quot;,
              &quot;db&quot; : &quot;admin&quot;
          },
          {
              &quot;role&quot; : &quot;clusterAdmin&quot;,
              &quot;db&quot; : &quot;admin&quot;
          }
      ]
  }
  {
      &quot;_id&quot; : &quot;admin.myuser&quot;,
      &quot;user&quot; : &quot;myuser&quot;,
      &quot;db&quot; : &quot;admin&quot;,
      &quot;roles&quot; : [
          {
              &quot;role&quot; : &quot;root&quot;,
              &quot;db&quot; : &quot;admin&quot;
          }
      ]
  }
  </code></pre>
  <p>When I want to remove user <code>myuser</code> I'm using:</p>
  <pre><code>&gt; db.dropUser(myuser)
  2016-02-11T14:13:21.107+0000 E QUERY    [thread1] ReferenceError: myuser is not defined :
  @(shell):1:1
  </code></pre>
  <p>What is the reason for that and how can I remove this user from my database?</p>