私のmongo db(v2.6)には厄介な問題があります。役割を持つルートユーザーを追加しました:
{role: "root", db: "admin"}
私の問題は、他のデータベースの認証を設定したかったのですが、コマンドラインなしでユーザーを追加できることです。これをコマンドラインで使用しました:
db.createUser({user: "dbuser", pwd: "dbpass", roles: ["dbAdmin"]})
大丈夫です。しかし、私は真のコマンドライン愛好家ではないので、AdminUI が好きです。そのためにMongoHUBを使用しています。ログインして、どのデータベースでもコレクションを追加/削除できますが、データベースのユーザーを作成できません。次のエラーが表示されます。
not authorized on admin to execute command
私はマニュアルでこれを読みました:
"root does not include the ability to insert data directly into the system.users and system.roles collections in the admin database."
では、私にとって正しい役割は何ですか?
助けてくれてありがとう。