There are 9 mongo nodes in our environment with:
- 1 mongos
- 3 configuration servers (mongod --configSvr)
- 9 mongod servers (fragments or members of sketched replica sets)
and we are trying to implement authentication on them.
I have done this in the past with a single server, and it was very simple:
- just add admin user to admin database
- add user to each database
I had to restart mongod with the --auth , but it does not work here.
I added an administrator account to our mongos and to our fined databases; I tried to authenticate as the user I just created, but that didn't work.
I tried to create the admin user in each database and the other user accounts that we need, but it still does not work.
I also tried to make sure that all of our mongo servers work with the --keyFile option specified either on the command line or in the /etc/mongodb.conf files, but this did not seem to help.
When I try to authenticate as the given user, for example:
db.auth("user","passwd")
it fails and returns 0 , as in false ; not non-zero .
I really need all the help I can get, so please at least leave some suggestions about what I could try - I cannot overestimate this, any help is more than welcome, as I seem to be going nowhere I wonβt get away simply following the official documents on managing / administering clusters placed in the manga.
authentication database mongodb nosql sharding
primero
source share