You can add users from the command line, but it is not so simple.
Essentially, you need to run something like mongo. For simplicity, I'm not going to add bcrypt code to create passwords.
Instead, you can use a shared meteor password (default). To do this, create the meteor application, add accounts-password and create a user account. Use the value of services.password.bcrypt for all users). When you create a user account, this bcrypt represents the generated user password.
Then you can create a default script:
var user = { "createdAt": new Date(), "emails": [ ], "username": "<username>", "profile": { "name": "<Name>" }, "services": { "password": { "bcrypt": "$2a$10$eUVSifclpbABCDEFGHIJKLmnopqr12323112ABBBCEDOINg2A7q0e" }, "resume": { "loginTokens": [ ] } } } db.users.add(user);
Then you can run this script (be sure to replace the values ββwith and.) _Id if you can with a random string. This way mongodb will generate _id as an ObjectID .
Then you can run this script (if you named it myjsfile.js) from the command line (if mongo is on local port 3001):
mongo localhost:3001/meteor myjsfile.js
source share