Mongo Authentication Issues

Hello, I have a new AWS server with a stack of Bitnami bits.

I am the root user on the server and I started mongo on the command line.

when I try to do something (other than "use test" or "use admin"), for example, "show dbs"

I get the following error:

show dbs

 listDatabases failed:{ "ok" : 0, "errmsg" : "unauthorized" } at src/mongo/shell/mongo.js:46

I know that I am doing something wrong with respect to permissions, I just do not know what it is.

when I looked at the mongodb.config file, everything looks fine, but I see:

  # Turn on/off security.  Off is currently the default
  #noauth = true
  auth = true

Also, perhaps it is appropriate when I try to run mongod, I get errors regarding "/ data / db", does not exist, or if I create a directory, I get "not enough space problems"

Thank you for your time.

+3
source
2

mongod , , , , . , , , , .

, , :

$ mongo admin --username root --pasword YOURPASSWORD

. .

. MongoDB, :

http://docs.mongodb.org/manual/administration/security-access-control/

+3

, .

,

db.auth("user_name",'passwd');
+3

All Articles