You can add users from the command prompt but its not that easy.
Essentially you need to run something like this from mongo. For the sake of simplicity I'm not going to add in bcrypt code to make passwords.
Instead you can use a generic meteor password (default). For this create a meteor app, add in accounts-password
and create a user account. Use the services.password.bcrypt
value for all users). When you create a user account this bcrypt has represents the created user's 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 and values. Also the _id if you can with a random string. This way mongodb will generate the _id as an ObjectID
.
Then you can run this script (if you called it myjsfile.js) from the command prompt (if mongo is on the local port 3001):
mongo localhost:3001/meteor myjsfile.js