The instructions for auto install of ubuntu 20.4 talks about an encrypted password $crypted_pass.

version: 1
    hostname: hostname
    username: username
    password: $crypted_pass

how do I generate this for any given password? I've tried a straight sha-512 hash but this doesn't work

From these instructions it appears I should get


for root but the sha-512 hash of root is


The crypted string that you get will depend on the salt value - to reproduce the one in the example you would need to duplicate its 16-character salt:

$ printf 'root' | openssl passwd -6 -salt 'FhcddHFVZ7ABA4Gi' -stdin

See also:


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.