1 const bcrypt = require('bcrypt');
3 /* The sigint:true property allows the user to abort the entire program
4 * with Control-C (rather than having to abort through each prompt).
6 const prompt = require('prompt-sync')({
10 const username = prompt("Username: ");
13 /* Use "echo:'*'" to avoid displaying the password while typing. */
14 var password = prompt("New password: ", {echo: '*'});
15 const password_again = prompt("Re-type new password: ", {echo: '*'});
17 if (password === password_again)
20 console.log("Passwords do not match. Try again.");
23 const hash = bcrypt.hashSync(password, 12);
25 console.log(`Add the following block to the 'users' object in lmno-config.js:
28 "password_hash_bcrypt": "${hash}",