Class applied to 19 hosts; 3 won't change

I have applied a user class <http://pastebin.com/v2ki9RK4> to change an
existing user's password to 19 hosts. The hash for the class is set as a
smart param. Each of the hosts show that the class is applied in the UI,
confirmed by YAML dump. The problem is that 3 of the hosts' passwords
won't update. The hosts are a mix of Ubuntu 12.04.5 & 14.04.1. The 3
problem hosts are all 12.04.5.

I have audited all of our hosts for the presence of libshadow-ruby1.8 - all
of them have it (1.4.1-8build1) save for 6 of our 14.04.1 hosts; none of
which are the problem hosts. Running

ruby -e "require 'puppet' ; puts Puppet.features.libshadow?"

on all hosts returns "true," save for the 3 problem hosts. Running puppet
agent in debug mode shows this error
<http://www.puppetcookbook.com/posts/managing-user-password-fails.html> on
the problem hosts. Attempting to install libshadow-ruby1.8 on the 6 14.04
hosts above returns the error "E: Package 'libshadow-ruby1.8' has no
installation candidate" I had thought that the hissue might have been a
disc

So…

I'm under the impression that there is no libshadow-ruby package in
development for Trusty & beyond. If that's the case, how are those 6 hosts
returning "true" to the above query? All of the hosts return an empty
local gems list.

Is there another method of managing user passwords via puppet that I'm
unaware of?

And the $10,000 question: why is the class not changing the user's password
on 3 of the 19 hosts?

This is probably better asked on the puppet-users list if it continues to
be a problem, but I can answer some of your questions…

> I have applied a user class <http://pastebin.com/v2ki9RK4> to change an
> existing user's password to 19 hosts. The hash for the class is set as a
> smart param. Each of the hosts show that the class is applied in the UI,
> confirmed by YAML dump. The problem is that 3 of the hosts' passwords
> won't update. The hosts are a mix of Ubuntu 12.04.5 & 14.04.1. The 3
> problem hosts are all 12.04.5.
>
> I have audited all of our hosts for the presence of libshadow-ruby1.8 -
> all of them have it (1.4.1-8build1) save for 6 of our 14.04.1 hosts; none
> of which are the problem hosts. Running
>
> ruby -e "require 'puppet' ; puts Puppet.features.libshadow?"
>
> on all hosts returns "true," save for the 3 problem hosts. Running puppet
> agent in debug mode shows this error
> <http://www.puppetcookbook.com/posts/managing-user-password-fails.html>
> on the problem hosts. Attempting to install libshadow-ruby1.8 on the 6
> 14.04 hosts above returns the error "E: Package 'libshadow-ruby1.8' has no
> installation candidate" I had thought that the hissue might have been a
> disc
>
> So…
>
> I'm under the impression that there is no libshadow-ruby package in
> development for Trusty & beyond. If that's the case, how are those 6 hosts
> returning "true" to the above query? All of the hosts return an empty
> local gems list.
>

lib<name>-ruby is the old style of ruby packaging on Debian OSs.
ruby-<name> is the new style, and I do indeed see a ruby-shadow package for
trusty[1]. In addition, you won't see a 1.8 package under any name for
trusty, since the default ruby version on trusty is 1.9.

> And the $10,000 question: why is the class not changing the user's
> password on 3 of the 19
>
hosts?
>
> Were you running the above code as root? The agent runs as root, and if
you've only installed ruby-shadow as a gem or similar in userspace, then
your user may have it, but the system may not. Check the package is
definitely installed.

Greg

[1] http://packages.ubuntu.com/trusty/ruby-shadow

··· On 31 October 2014 20:02, Travis Burrell wrote:

Greg - thanks for your reply. You are correct, the 6 Trusty hosts have
ruby-shadow installed; that solves that mystery.

As for our 3 trouble Precise hosts, all 3 have the libshadow-ruby1.8
package installed, and all respond "false" to the above query (run as root).

I will post my issue on ask.puppetlabs.com. Thanks again.