Running some js, I see
MongoServerError[Unauthorized]: not authorized on mydb to execute command { find: “system.views”, filter: { _id: ObjectId(‘xxxxxxxxxxxxx’) }, limit: 1, lsid: { id: UUID(“xxxxxxxxxxxxxxxx”) }, $db: “mydb” }authenticationDatabase admin
mongo 6*
admin> db.getUser(‘me’)
{
_id: 'admin.me,
userId: UUID(‘xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx’),
user: 'me,
db: ‘admin’,
roles: [
{ role: ‘root’, db: ‘admin’ },
{ role: ‘readAnyDatabase’, db: ‘admin’ },
{ role: ‘dbAdminAnyDatabase’, db: ‘admin’ }
]
}
What’s going on here, do I need additional roles ? Feel I’m missing something … !
Thanks