Is there an issue with using subscribe?  So in my virtual resource 
definition I have:

define accounts::virtual ($uid,$realname,$pass) {

  user { $title:
    ensure            =>  'present',
    uid               =>  $uid,
    gid               =>  $title,
    shell             =>  '/bin/bash',
    home              =>  "/home/${title}",
    comment           =>  $realname,
#    password          =>  $pass,
    password_max_age => '90',
    password_min_age => '0',
    groups     => ['sudo'],
    managehome        =>  true,
    require           =>  Group[$title],
  }
  group { $title:
    gid               =>  $uid,
  }

  exec { "/usr/sbin/usermod -p \'$pass\' $title":
    refreshonly => true,
    subscribe => User[$title],
    #    logoutput => true,
  }
...
...
...


And this is starting from Scott Lowe's blog:
http://blog.scottlowe.org/2012/11/25/using-puppet-for-account-management/

I guess the only gotcha I see is if something changes and causing the user 
to get updated, it will reset the password to the "default" 


On Monday, January 13, 2014 5:30:01 PM UTC-6, house_mann wrote:
>
> Ygor, thanks to the scripting. I'll try this later, looks good.
>
> And thanks to those other hints and opinions...
>
> ako
>
> Am Montag, 13. Januar 2014 18:35:20 UTC+1 schrieb house_mann:
>>
>> HI their,
>>
>> i'm very new to puppet and can't find an solutions to get this up and 
>> running...
>> User creation works well. But when the user "devop" (or all others) 
>> change his password, it will overwrite after next 'puppet-run' to the 
>> hardcoded-one.
>> Correctly, because there is no setup/config to prevent this, when users 
>> exists on the node.
>> Is there a simple setup for this case? Only set password for non-existing 
>> users!?
>>
>> Thanks.
>> ako
>>
>>
>>
>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/0e10dc12-4e96-40c3-b133-61b676b454a6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to