
Untitled
By: a guest on
Feb 4th, 2011 | syntax:
None | size: 0.99 KB | hits: 104 | expires: Never
# Modify files in /etc/pam.d
exec {"modify pam.d":
command => "bash -c \"cd /etc/pam.d; for i in rlogin rsh; do sed -e 's/pam_rhosts_auth.so *$/pam_rhosts_auto.so promiscuous/' < \$i > \$i.tmp; cmp -s \$i \$i.tmp; if [ \$? = 1 ]; then /bin/cp -f \$i \$i.orig; /bin/cp -f \$i.tmp \$i; /bin/rm -f \$i.tmp; fi; done; exit 0\"",
cwd => "/etc/pam.d",
creates => [ "/etc/pam.d/rlogin.orig", "/etc/pam.d/rsh.orig" ],
path => "/bin:/usr/bin:/sbin:/usr/sbin",
}
Message in log file on client:
Feb 4 14:45:19 el5u5clt01 puppet-agent[5864]: (/Stage[main]/Rhel5u5-post-install/Exec[modify pam.d]/returns) change from notrun to 0 failed: bash -c "cd /etc/pam.d; for i in rlogin rsh; do sed -e 's/pam_rhosts_auth.so *$/pam_rhosts_auto.so promiscuous/' < $i > $i.tmp; cmp -s $i $i.tmp; if [ $? = 1 ]; then /bin/cp -f $i $i.orig; /bin/cp -f $i.tmp $i; /bin/rm -f $i.tmp; fi; done; exit 0" returned 2 instead of one of [0] at /etc/puppet/manifests/rhel5u5-post-install.pp:31