I've done that on openbsd systems with something like this: exec { "setpass $name": onlyif => "grep '^$name:\*' /etc/master.passwd", command => "usermod -p '$pwstring' $name", require => User[$name], }
Note that the onlyif on this command is intended to set the password only on accounts that have none, so you'll have to modify it to fit your needs. $pwstring is a pre-hashed password, for obvious reasons. HTH, Marti On Oct 2, 10:01 am, "Geoff Newell" <[EMAIL PROTECTED]> wrote: > I'm working on a turnkey Linux system where the post build config is handled > with puppet. > One of the unique constraints with a turnkey system is that passwords are > essentially set at build time and then stay fixed for the life of the > product. > I was wondering if anyone had used puppet to manage user passwords? > The 'user' type supports an encrypted hash, but ideally I need the facility > of passing in a plaintext password, md5 hash it and then have puppet > idempotently check it's been set. > > Thoughts? > > Geoff. --~--~---------~--~----~------------~-------~--~----~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---