key-networks / ztncui

ZeroTier network controller UI
GNU General Public License v3.0
1.56k stars 230 forks source link

set password from command line? #14

Closed oriolrius closed 5 years ago

oriolrius commented 5 years ago

Hi, as far as I understand there is no easy way of setting the password to default.password from command line. Please, could you tell me which is the algorithm for generating a new password from CLI and avoid the setup security issue described in your documentation?

Thank you very much, regards.

Oriol

key-networks commented 5 years ago

Hi Oriol, the quick answer is argon2 (Argon2i). You can probably use this https://www.npmjs.com/package/argon2-cli from the command line. I have not tried it, but it should work to generate the password hash. You then just need to construct the JSON around it as per the example in default.passwd .

Regards, Steve

oriolrius commented 5 years ago

Thank you Steve, it works OK for me this workaround.