I just wanted to let you know that you should be careful with quote signs while evaluating mongo commands.
I nearly wrecked my head as to why this statement wouldn’t work:
mongo admin --eval “db.auth(“alice”,“secret”)”
but this works:
mongo admin --eval “db.auth(‘alice’,‘secret’)”
Apparently you should always mix these two different quote signs for the command to work fine.