Changing default username/password in RockMongo
Asked Answered
A

3

8

I've just set up RockMongo as per these instructions, but I can't see how to change my username/password from the defaults (admin/admin).

In the config.php file there are two commented out lines to set mongo_user and mongo_pass, but these are database specific (I believe), and I've tried changing them but the login credentials for RockMongo are still admin/admin.

Anyone know how to change them?

Afebrile answered 29/2, 2012 at 16:35 Comment(0)
S
14

You need to change the line in config.php just below where you were looking:

$MONGO["servers"][$i]["control_users"]["admin"] = "admin";

The first admin is the username and the second the password. There is a comment on that line mentioning the caveat that this only works if mongo_auth is set to false (which is the default).

Southwestward answered 29/2, 2012 at 16:52 Comment(1)
ah perfect thanks. would have been more obvious if the defaults were admin/password!Afebrile
C
0

Here is configuration guide: http://code.google.com/p/rock-php/wiki/configuration

There is a mongo_auth demo and control_auth demo.

Creon answered 3/3, 2012 at 2:0 Comment(0)
P
0

In the version 2014 Q4 there is a new bug, even if:

$MONGO["servers"][$i]["mongo_auth"] = false;

You will still need to comment out:

// $MONGO["servers"][$i]["mongo_user"] = ...
// $MONGO["servers"][$i]["mongo_pass"] = ...

Which is a change in the config from the 2013 version I was running, which did not mind those two lines uncommented.

In total what worked for me when i upgraded is this:

// $MONGO["servers"][$i]["mongo_db"] = "MONGO_DATABASE";
// $MONGO["servers"][$i]["mongo_user"] = ...
// $MONGO["servers"][$i]["mongo_pass"] = ...
$MONGO["servers"][$i]["mongo_auth"] = false;
$MONGO["servers"][$i]["control_auth"] = false;
$MONGO["servers"][$i]["control_users"]["admin-name"] = "admin-password";
Purr answered 17/11, 2014 at 8:19 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.