I want to set up user name & password authentication for my MongoDB instance so that any remote access will ask for the user name & password. I tried the tutorial from the MongoDB site and did the following:
use admin
db.addUser('theadmin', '12345');
db.auth('theadmin','12345');
After that, I exited and ran mongo again. And I don't need the password to access it. Even if I connect to the database remotely, I am not prompted for username & password.