Hi,
I am trying to set the password for a user that I have created using the
puppet provisioner of Vagrant for a Linux version 2.6.32-71.el6.x86_64 Red
Hat 4.4.4-13 box.
I have tried both approaches:
Approach1
user { "test":
ensure => present,
shell => "/bin/bash",
password => "encrypted_password_generated_by_passwd_command",
managehome => true,
}
Approach2
exec { "create-test-password":
onlyif => "/bin/egrep '^test:' /etc/passwd",
command => '/usr/sbin/usermod -p
$6$BlODgWJe$eQ.xkRSzkXpMudl831q78I8lh4hHLVGVKds.6hpcPe348uoqWXmlf6PC1s4TfmPhYrPHo6dbdbmNkz2UxewfS1
test',
require => User["test"],
}
The first approach fills in the /etc/shadow file with an entry !!
concerning the hashed password of the specific user,
The second approach fills in a part of the above hashed password the
/etc/shadow file entry., ie. for the above example:
test:.xkRSzkXpMudl831q78I8lh4hHLVGVKds.6hpcPe348uoqWXmlf6PC1s4TfmPhYrPHo6dbdbmNkz2UxewfS1:15523:0:99999:7:::
Is there something I am missing? Is there any other approach that I should
use?
My puppet version is 2.7.1 ( and my Vagrant version is 1.0.3 although I
dont know if this relates with my problem) .
Thanks in advance.
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/puppet-users/-/tYRgMXG0SxQJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/puppet-users?hl=en.