Ask Your Question

create password for user

asked 2015-05-06 04:35:14 -0500

paragdj gravatar image


I am trying to create a password for a user that is being created by Puppet. I generate a sha512sum for the password and use that value in the resource attribute

user {"dang": home => "/home/dang", shell => "/bin/bash", password => " Long script generated by SHA512sum", }

when i try to login as Dang the password is not accepted. What am i doing wrong. ?

Thanks Parag Daulatjada

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2015-05-06 12:32:27 -0500

JohnsonEarls gravatar image

updated 2015-05-06 12:34:44 -0500

A sha512 password is not just a sha512 hash of the password. It's a combinatorial hash of the password with a "salt", iterated a large number of times, and has a specific format so it can be recognized: A $6$ followed by the "salt", another $, and the result of the combinatorial hash in base64 encoding.

If your system has /sbin/grub-crypt, try running that to generate your encrypted password:

$ /sbin/grub-crypt --sha-512
Retype password:
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools



Asked: 2015-05-06 04:35:14 -0500

Seen: 1,154 times

Last updated: May 06 '15