I have created a user in the admin db with the following command:
db.createUser({user: \'username\', pwd: \'pass\', roles: [ { role: \'root\', db: \'admin\' }