I am new to puppet, I want to make a class that creates users and sets their password to be managed and **encrypted**. Is this possible? I cant seem to find anyway of doing it by default?
e.g.
class users
{
user { "foo":
ensure => present,
managehome => true,
home => "/home/foo",
password => '!!',
password_max_age => '99999',
password_min_age => '0',
}
}
Isn't !! == not a password? Do I just set each users password to password => 'password' or randomly generate one for each user?
I read that you can use stdlib to encrypt it, e,g,
password => pw_hash('password', 'SHA-512', 'mysalt')
I am unsure how I would tie this INTO the class script without installing it prior. (I would rather have it part of this script for less manual execution of scripts)
Thanks for the read!
↧