<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Raskas' blog &#187; puppet</title>
	<atom:link href="http://www.raskas.be/blog/category/linux-sysadmin/puppet/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.raskas.be/blog</link>
	<description>Everything is possible... You only have to find out how.</description>
	<lastBuildDate>Sat, 05 Dec 2009 14:18:39 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Managing user passwords with Puppet on CentOs</title>
		<link>http://www.raskas.be/blog/2007/09/10/managing-user-passwords-with-puppet-on-centos/</link>
		<comments>http://www.raskas.be/blog/2007/09/10/managing-user-passwords-with-puppet-on-centos/#comments</comments>
		<pubDate>Mon, 10 Sep 2007 17:32:39 +0000</pubDate>
		<dc:creator>Johan Huysmans</dc:creator>
				<category><![CDATA[puppet]]></category>

		<guid isPermaLink="false">http://www.raskas.be/blog/2007/09/10/managing-user-passwords-with-puppet-on-centos/</guid>
		<description><![CDATA[If you try to manage users and there passwords with puppet on CentOs you will receive the error explained by &#8220;Known issues&#8221; on following page: Puppet on RedHat/CentOS. That page also describes the solution: install the libshadow package on the client.
It is not that easy because there is not yet an rpm of the ruby [...]]]></description>
			<content:encoded><![CDATA[<p>If you try to manage users and there passwords with <a href="http://reductivelabs.com/">puppet</a> on CentOs you will receive the error explained by &#8220;Known issues&#8221; on following page: <a href="http://reductivelabs.com/trac/puppet/wiki/PuppetRedHatCentos">Puppet on RedHat/CentOS</a>. That page also describes the solution: <strong>install the libshadow package on the client</strong>.<br />
It is not that easy because there is not yet an rpm of the ruby shadow libraries for CentOs.</p>
<p>&#8220;Not yet&#8221; because there IS a <strong>ruby-shadow</strong> rpm available in fedora (see: <a href="https://bugzilla.redhat.com/show_bug.cgi?id=240008">https://bugzilla.redhat.com/show_bug.cgi?id=240008</a>). </p>
<p>So we only need to download and rebuild it:<code><br />
wget http://download.fedora.redhat.com/pub/fedora/linux/extras/6/SRPMS/ruby-shadow-1.4.1-6.fc6.src.rpm<br />
rpmbuild --rebuild ruby-shadow-1.4.1-6.fc6.src.rpm<br />
</code></p>
<p>Once we have that rebuilded rpm we can install it on all our puppet-clients. Off course we are not going to do this manually but use puppet for it <img src='http://www.raskas.be/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> .<br />
If you have a local repository you can just add the package, but this is not yet the case for my setup so we need some extra rules.<br />
Here is a snippet of puppet manifest:</p>
<p><code>
<pre>
class ruby-shadow {
   package {
      "ruby-shadow":
         ensure   => installed,
         provider => rpm,
         source   => "/tmp/ruby-shadow-1.4.1-6.i386.rpm",
         require  => file["/tmp/ruby-shadow-1.4.1-6.i386.rpm"],
   }

   file {
      "/tmp/ruby-shadow-1.4.1-6.i386.rpm":
         source => "puppet://puppetmaster/files/ALL/tmp/ruby-shadow-1.4.1-6.i386.rpm"
   }
}

class users {
   include ruby-shadow
   user {
      "root":
         ensure   => present,
         name     => "root",
         password => "SomeAlreadyEncryptedPassword";
   }
}
</pre>
<p></code></p>
<p>With this code it will require 2 runs of the puppet client. Even if you add a require in the user section for the ruby-shadow package 2 runs are necessary. Don&#8217;t know if this is a bug or a feature&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.raskas.be/blog/2007/09/10/managing-user-passwords-with-puppet-on-centos/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>
