I need to create a test user with a password using puppet.
I\'ve read that puppet cannot manage user passwords in a generic cross-platform way, which is a pity. I am
The stdlib package of puppetlabs implements a similar pw_hash function of the accepted answer.
Be sure to add the library to your configuration. If you use librarian, just add in your Puppetfile
mod 'puppetlabs-stdlib'
Then to create an user, simply :
user { 'user':
ensure => present,
password => pw_hash('password', 'SHA-512', 'mysalt'),
}