-
Type:
Question
-
Resolution: Done
-
Priority:
Minor - P4
-
None
-
Affects Version/s: 2.0.4
-
Component/s: Admin
-
None
-
3
-
None
-
None
-
None
-
None
-
None
-
None
My question might be stupid, but I am very new to mongodb. An admin ID was created by our mongodb administrator. The id ex. is("george","password")
on mongos server:
I log in
use admin
db.auth("george","password");
get 1
no problem
db.system.users.find()
{ "_id" : ObjectId("4f6b4a667f1a1c7f7842bee0"), "user" : "george", "readOnly" : false, "pwd" : "d962c58450d4df2a3eb94b944e292bde" }can run commands
show dbs
show collections
printShartingStatus etc.
of cource the db.printReplicationInfo() can not be run here. I need to go down to my replica set
servers(6 of them) and run it, but I can not get authentiacated on those.
connecting to: 127.0.0.1:27018/test
> use admin
switched to db admin
> db.auth("george","password")
0
show dbs
Thu Mar 22 16:37:30 uncaught exception: listDatabases failed:
PS _ We use a keyFile
What am I doing wrong here.
Appreciate your help.