nick.maystre...@gmail.com wrote: > On Fri, 20 Mar 2009 06:18:42 +0500, jrojas <jason.r.ro...@gmail.com> wrote: > Am I understand you right? I must exec this string "/usr/bin/chpass -p > \$1\$HvjTWzzz\$jF.G/mEbh7IOtpCdUPUTO1 pt_" > If yes, so it is not work(( > PS This is my "new" config string which NOT working as I want: exec { > "/usr/bin/chpass -p \$1\$HvjTWzzz\$jF.G/mEbh7IOtpCdUPUTO1 pt_":} > >> You have to escape the dollar signs or quote the text specifically.
or quote it: command => "/usr/bin/chpass -p '$1$foo$bar' pt_"; worst case, put the command in a shell script, pull the script to the client with a file entry, and exec it. Might be a grep typo in the onlyif statement below -- it's intended to run the chpass script if and only if the password is set incorrectly. Otherwise, you could write whatever logic you want in the script to ensure that the password isn't already set properly before it runs chpass. file { "/path/to/script": source => "puppet://server/other/path/to/script", mode => 0700; } exec { "chpass_pt_": command => "/path/to/script", onlyif => "egrep -q '^pt_:.*UPUTO1:' /path/to/passwd", require => File["/path/to/script"]; } -- Mike Renfro / R&D Engineer, Center for Manufacturing Research, 931 372-3601 / Tennessee Technological University -- ren...@tntech.edu --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---