I have a MongoDB (Service Plan: small) and I would like to create an additional user but it seems I dont have the necessary privileges to do so.
db.createUser({ user: "whateverusername" , pwd: "whateverpassword", roles: ["userAdminAnyDatabase", "dbAdminAnyDatabase", "readWriteAnyDatabase"]})
Failed to execute script.
Error: couldn't add user: not authorized on XXXXXXX to execute command { createUser: "whateverusername", pwd: "xxx", roles: [ "userAdminAnyDatabase", "dbAdminAnyDatabase", "readWriteAnyDatabase" ], digestPassword: false, writeConcern: { w: "majority", wtimeout: 600000.0 } } : _getErrorWithCode@src/mongo/shell/utils.js:25:13 DB.prototype.createUser@src/mongo/shell/db.js:1290:15 @(shell):1:1
and I cant list the users:
db.system.users.find();
Error: error: { "ok" : 0, "errmsg" : "not authorized on XXXXXXX to execute command { find: \"system.users\", filter: {} }", "code" : 13, "codeName" : "Unauthorized" }
Is this restriction intended? Is there a way to get the readWriteAnyDatabase role? Am I doing something wrong?
I really appreciate any help you can provide!