On May 6, 3:51 pm, 骡骡 <ken.g...@gmail.com> wrote:
> in 1st day of each month , change passwd of root.
>
> # vi /etc/puppet/modules/user/manifests/init.pp
>
> class user {
>         exec { "rootpw":
>                 command => "/usr/sbin/usermod -p $rootpw root",
>                 onlyif => "/usr/bin/test `/bin/date -d now +%d` = '01'",
>         }
>
> }
>
> # vi  /etc/puppet/manifests/templates.pp
> import user
> node basenode {
>         $rootpw = "Vale.com-init"
>         include user
>
> }

change :  Use MD5 encryption

command => "/bin/echo 'root:$rootpw' | /usr/sbin/chpasswd -m",

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to