1

On the Server

I have the Mongod instance running on my server.

I created a User on admin, using which I created a user with readWrite role on the database that I wanted to access.

Updated the mongo /etc/mongod.conf file:

commented out the bind ip
uncommented auth=yes

Restarted Mongod using sudo service mongod restart

On the Client:

The db.auth(user,pass) command works fine on the remote server, but shows auth failure on the client (my home system).

I made sure that I was using the correct database with the use myDb command.

PS. I am able to connect to the mongo server using the mongo xx.xx.xx.xx:27017 command. But unable to Authenticate.

Please help. Mongo v3.0.3.

Community
  • 1
  • 1
myusuf
  • 11,810
  • 11
  • 35
  • 50
  • You've tagged this with Robomongo .. so I'm guessing that you're trying to use that as the client to authenticate from your home system? If so, lack of support for MongoDB 3.0 auth is a [known issue](http://stackoverflow.com/questions/29325011/mongodb-robomongo-cant-connect-authentication) with Robomongo 0.8.x. – Stennie Jun 23 '15 at 23:34
  • Thanks for pointing that out about Robomongo. But, mongo doesn't even connect in the client terminal :( – myusuf Jun 24 '15 at 06:56
  • Can you confirm the specific version of the client you are using? In the `mongo` shell you can get this with `version()`. It would also be helpful if you can include the exact failure message. – Stennie Jun 24 '15 at 06:59
  • MongoDB shell version: 2.6.9 – myusuf Jun 24 '15 at 07:06
  • 1
    You need to upgrade to a MongoDB 3.x shell. MongoDB 3.0 uses a new authentication method (SCRAM-SHA-1) which isn't supported by older tools or drivers: http://docs.mongodb.org/manual/release-notes/3.0-scram/. – Stennie Jun 24 '15 at 07:24
  • OK, thanks so much ! – myusuf Jun 24 '15 at 08:39

0 Answers0