title: how to update or change roles of default admin user on Mongodb once its created?
body: <p>I just setup a 3 node MongdoDB cluster with replicasets and made a novice mistake. I setup the replica set etc first and then was being fancy and setup the default admin user as below:</p>
  
  <blockquote>
    <p>show users
       {
               "_id" : ObjectId("blah"),
                "user" : "admin",
            "pwd" : "blah",
            "roles" : [
                    "userAdminAnyDatabase"
            ]
    }</p>
  </blockquote>
  
  <p>This is fine for basic admin but I cannot do any replica set commands as the role is not cluster admin:</p>
  
  <blockquote>
    <p>rs.status()
    { "ok" : 0, "errmsg" : "unauthorized" }</p>
  </blockquote>
  
  <p>I tried a few things </p>
  
  <p><ul>
  <li>adding a new user with a different set of roles but that did not work either. </li>
  <li>tried to use the update role for admin role - that did not work</p>
  
  <blockquote>
    <p>db.users.update({'user':'admin'}, {$addToSet: {'roles' :'clusterAdmin'}})
    not authorized for update on admin.users</li>
    </ul>
    Any other thoughts on this one - outside of redoing the setup for mongo?</p>
  </blockquote>