- 1. open mongodb shell
- 2. open admin db and add admin user (you need to have 1 user otherwise you can' lose access to your databases at all)
use admin
db.addUser("admin","12345")
sudo service mongodb restart
For more information please read Security Practices and Management