title: Create Read only user in Mongo DB Instance for a particular database
body: <p>I have created a user &quot;<strong>mongo01testro</strong>&quot; in the <strong>mongo01test</strong> database.</p>
  <pre><code>use mongo01test 
  db.addUser( &quot;mongo01testro&quot;, &quot;pwd01&quot;, true );
  db.system.users.find();
  { &quot;_id&quot; : ObjectId(&quot;53xyz&quot;), &quot;user&quot; : &quot;mongo01testro&quot;, &quot;readOnly&quot; : true, &quot;pwd&quot; : &quot;b9eel61&quot; }
  </code></pre>
  <p>When I logged in from another session as this newly created user,
  I am able to insert documents into the collection which is strange.</p>
  <p>I am looking to do the following:</p>
  <ol>
  <li>Create 2 separate users one for read only and one for read write for
  each database.</li>
  <li>Create an <strong>admin</strong> user which have sysadmin/dba access to all the
  databases in MongoDB instance used for Backup/Recovery or admin
  purpose.</li>
  </ol>
  <p>Please kindly help.</p>
  <p>Regards,
  Parag</p>