Puppet/Recipes

Root Password
class site::root_user { # This will enforce the root password of "puppet" user { root: ensure => present, password => '$6$7pe0INu/$Uxsn.lb/mJjd9394DIJx5JS9a1NVhrpWDpXRtPGS78 /BfyShhOf1G0ft7mRHspXDZo6.ezyqpqIXHQ8Tl8ZJt0', } }

src: https://ask.puppet.com/question/13589/how-can-i-best-manage-root-passwords-for-many-servers/

--

$password = 'hello'

user { 'test_user': ensure  => 'present', password => generate('/bin/sh', '-c', "mkpasswd -m sha-512 ${password} | tr -d '\n'"), }

src: http://stackoverflow.com/questions/19114328/managing-a-user-password-for-linux-in-puppet