How to enable auth and create users in mongodb replica set [ Access Control in a Replica Set ] Part2

preview_player
Показать описание
This is the second part of the video where we were learning, how to enable auth and create users in mongodb replica set step by step. In this, we will implement all the steps mentioned in part1 and will see how we enable auth, how internal authentication take place in replica set members in mongodb.

Note:- If you want to know which ownership you have to give i.e mongod or mongodb , using chown command mention in the video,
then check your mongo directory or check any file used by mongodb and see which ownership is given.

for eg: enter -
ll /var/lib/mongodb/

then , ownership will be visible to you as :-
drwxr-xr-x 4 mongodb mongodb 4096 Jun 30 20:32 ./

Рекомендации по теме
Комментарии
Автор

How did you solve your "permission denied" problem at 1:11? Thanks!

adriel.araujo
Автор

What will be the sybatax of Mongodb_uri to add in node backend for replica set

vivekkumargoel
Автор

I got a problem my replication is now in REcovery mode and syn is not happening... I think the video is about stand alone with replication enabled in config file, iwanted to see the impact on secondaries and how to copy these settings there, ,
and yes video is great help, thanks

awslearn
Автор

Hi mam your explanation is very great. Thanks for the videos. It's containing much info...


Coming to my problem I've enabled authentication in config file and restarted the server and then the error is happening as the primary and secondary are switching very frequently and for every command I give its changing to secondary and again it's coming back to primary.. and without authentication there's no problem of such that. Can you help me please with that? I'll be grateful if you reply

krishnareddy
Автор

Hello I have followed your steps
but it doesn't work now my replicaset members are all stuck on recovering state.


I did exactly the steps on you note pad

fasooly
Автор

Let's assume, there are four databases (admin, local, cofig, graylog) in primary mongodb replica set (total - 3 replica set, 1-primary 2-secondary). if i create a user with root / userAnyAdmindatabase privilege, will that user be able to read and write on all database ?

Since, I have to setup that user and password in Graylog conf file, that is connecting to MongoDB.

One more thing, if i setup a user in admin database but try to connect graylog database, will it ask me for the password.

Most important, can i implement Access Control without Internal Authentication?

Looking forward to see your expert advice!

Psydharth