2

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

version: 1
identity:
    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

$6$FhcddHFVZ7ABA4Gi$9l4yURWASWe8xEa1jzI0bacVLvhe3Yn4/G3AnU11K3X0yu/mICVRxfo6tZTB2noKljlIRzjkVZPocdf63MtzC0

for root but the sha-512 hash of root is

99ADC231B045331E514A516B4B7680F588E3823213ABE901738BC3AD67B2F6FCB3C64EFB93D18002588D3CCC1A49EFBAE1CE20CB43DF36B38651F11FA75678E8
4

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
$6$FhcddHFVZ7ABA4Gi$9l4yURWASWe8xEa1jzI0bacVLvhe3Yn4/G3AnU11K3X0yu/mICVRxfo6tZTB2noKljlIRzjkVZPocdf63MtzC0

See also:

1

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.