security - Mongo Admin set with dbAdmin role -


i using mongo 2.4.

i had single user in admin db, , added role "clusteradmin", when meant add "useradmin" role. can't execute user-admin based operations.

i tried update , remove user, add new user "useradmin" privileges, because "clusteradmin" role not have privileges users collection, i'm out of luck.

how bypass security add new user in admin db, "useradmin" privileges or remove current "admin" user "clusteradmin" privileges?

happened me lot, solve it, remove admin users using:

use admin db.system.users.remove(); 

and add new 1 admin

db.adduser("name","name); db.auth("name","name"); 

then create user role clusteradmin

but have login admin do

mongo -port 27017 -u name -p name admin 

Comments

Popular posts from this blog

linux - xterm copying to CLIPBOARD using copy-selection causes automatic updating of CLIPBOARD upon mouse selection -

c++ - qgraphicsview horizontal scrolling always has a vertical delta -