Can't add user after creating admin user: createUser requires authentication

Anyone can help please
when I create admin user in mongo shell I got this problem
uncaught exception: Error: couldn’t add user: command createUser requires authentication :

You need to authenticate with the admin user to create subsequent users.


Hi @PT_Tadib_Sejahtera

If you are trying to create your first user when authentication is enabled you need to do it using mongo on the server that mongodb is running.

Or you can follow the Enable Access Control Document.


This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.