TurnKey Linux Virtual Appliance Library

Unable to Login in Mongodb

chinmayachandel's picture

Can anyone let me know the default username and password for Logging in MongoDB which i have recently downloaded from turnkey template.

Jeremy Davis's picture

Set them with the init scripts


Should get you going... :)

Guest's picture

same issue

same issue

Jeremy Davis's picture

Which version are your using?

Which version are your using? And where/which build? E.g. Hub, VM install from ISO, etc.

I just tested the v14.0 appliance via the Hub and I could log in fine using "admin" and the password I set on launch. It should work fine from the ISO install too (the Hub instances are built from the ISO).

Guest's picture

Same problem here. Can't

Same problem here. Can't login after using template (proxmox) no matter what username/combo I try.

Jeremy Davis's picture

Are you using the old one or the new one?

V14.0 definitely works. Although you'll need to install from ISO.
Guest's picture

Same here

Proxmox with iso ver 14.01

Can't login!

With or whithout ubdates.


Jeremy Davis's picture

Ok right you are...

Hmm, I'll look into it some more.
Jeremy Davis's picture

Ok I have a workaround...

Apologies to everyone. We will fix this and re-release a fixed build. In the meantime here is a workaround:

In a terminal set your new password:

then copy/paste this:
service mongodb stop
mongod --dbpath /var/lib/mongodb --noauth --fork --logpath /var/log/mongodb/mongodb.reset-admin.log --bind_ip
mongo admin --eval "db.changeUserPassword(\"admin\",\"$NEW_PASS\");" 
mongod --dbpath /var/lib/mongodb --shutdown
service mongodb start

[updated] to use the proper syntax for running mongo within a bash script (i.e. "--eval"); plus added "--bind_ip" when starting mongo with "--noauth" (so that mongo will only accept local connections while running with no authorisation required).

Post new comment

The content of this field is kept private and will not be shown publicly. If you have a Gravatar account, used to display your avatar.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <p> <span> <div> <h1> <h2> <h3> <h4> <h5> <h6> <img> <map> <area> <hr> <br> <br /> <ul> <ol> <li> <dl> <dt> <dd> <table> <tr> <td> <em> <b> <u> <i> <strong> <font> <del> <ins> <sub> <sup> <quote> <blockquote> <pre> <address> <code> <cite> <strike> <caption>

More information about formatting options

Leave this field empty. It's part of a security mechanism.
(Dear spammers: moderators are notified of all new posts. Spam is deleted immediately)