Saturday 15 June 2013

mongodb - Mongo - How can I find out what roles the user I am connected as has? How can I assign a user full read-write access? -



mongodb - Mongo - How can I find out what roles the user I am connected as has? How can I assign a user full read-write access? -

i have been able connect mongo instance (which hosted in cloud @ compose.io -- "addon" through heroku) macbook terminal command line.

however, cannot perform operations. commands "show collections" , "show users" fail "not authorized" error.

how can find out roles user connected has? also, how can add together user total read-write permissions? of course of study i've tried:

db.createuser({ user: "accountuser", pwd: "password", roles: [ "readwrite", "dbadmin" ] })

but command fails couldn't add together user: not authorized on my_db execute command

to view info current user, run db.getuser() on user's database. you'll need check mongodb provider on how they've set security figure out how add together right roles users.

mongodb user mongodb-query user-roles

No comments:

Post a Comment