The issue you have is that Puppet is not updating the /etc/shadow file, but
even once it's doing that correctly, Method 1 still will not work. The
sha1() and md5() functions do not produce passwd/shadow compatible values
because that is not what they are for. Generating encrypted passwords is
more complex than a simple hash of the password.

Method 2 *should* work, but since it's not, you have something else going
on. Have you tried to apply the manifest using debug and/or verbose mode?

I will guess that you're missing the ruby-shadow package, which Puppet
needs to manage those files. Check your package provider and/or gem to make
sure you have it installed.


❧ Brian Mathis


On Wed, Apr 23, 2014 at 5:27 PM, Mike R <[email protected]> wrote:

> I can't get puppet to update the password for any users that I declare,
> this is my manifest:
>
> user {'test1':
>     ensure => present,
>     password => sha1('vagrant'),
>     shell => '/bin/bash',
> }
>
>
> I also tried with the md5() function, and with raw password hash. I am on
> Ubuntu 12.04, using Puppet 2.7.19, Vagrant 1.5.3.
>
> When I check /etc/shadow, all I see is ! (exclamation points where the
> password should be)
>
> test4:!:16183:0:99999:7:::
> test3:!:16183:0:99999:7:::
> test1:!:16183:0:99999:7:::
> test2:!:16183:0:99999:7:::
>
>
>
> I posted my question to stackoverflow with more details:
> http://stackoverflow.com/questions/23253271/not-updating-the-user-password
> I also looked over this old post
> https://groups.google.com/forum/#!topic/puppet-users/gXpt-YjROMw
>
> --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/puppet-users/4c1b1ad3-2d3f-41dd-8709-7bb3f83c7c21%40googlegroups.com<https://groups.google.com/d/msgid/puppet-users/4c1b1ad3-2d3f-41dd-8709-7bb3f83c7c21%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CALKwpEz4P96-JKApD%2BQ1jkaRdQA_%2Bc_ei4ZPyhagKH%2B6-PtP4w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to