I have set up a MongoDB database with an admin user that has only administrative rights, not read or write access to databases.
admin
What I now would want to do
Solved it by putting the commands
use dummydb db.addUser('dummyuser', 'dummysecret')
into a .js file, and then ran MongoDB by calling:
.js
$ mongo admin -u admin -p admin < setupMongoDB.js
That's it :-)