$ mongo > db = db.getSiblingDB('admin') > db.createUser({user: "username", pwd: "password", roles: ["userAdminAnyDatabase"]})
$ mongo > db = db.getSiblingDB('admin') > db.createUser({user: "username", pwd: "password", roles: ["dbAdminAnyDatabase", "userAdminAnyDatabase", "readWriteAnyDatabase", "clusterAdmin"]})
References: