Cant Secure MongoDb need help

I’m trying to secure mongodb by following the link

But it isn’t working. -I’m on step 1:.

This is what happens

... {
... user: "Adam",
... pwd: passwordPrompt(),
... roles: [ { role: "userAdminAnyDatabase", db: "admin" }, "readWriteAnyDatabase" ]
... }
... )
Enter password:
uncaught exception: Error: couldn't add user: Could not find role: readWriteAnyD atabase@test :

What went wrong?

Does this mean the mongodb installation is broken? I followed the digital ocean link

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer