Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I've been assigned to use Puppet to synchronize user passwords across an arbitrary number of servers, so that a user can change their password once and have that change pushed out to an arbitrary number of servers. Most of the advice I've seen has been to use something else, like LDAP, but I've been specifically instructed to use Puppet.

All I have so far is a class that, when run, sets a user's password. It should take the user id from facter to prevent someone from changing someone else's password.

class pwdchange ($newpassword = '') {
  user {"$::id":
    ensure   => present
    password => $encryptednewpassword
  }
}

What I'm looking for is how to take a cleartext argument, check it to make sure it's a good password, and encrypt it with md5. I'll do that to get from newpassword to encryptednewpassword. Do I need to use an exec resource with the md5sum command? Or should I have a template that encrypts the password using ruby code? Or is there an easy, simple way to do this that I'm not seeing?

share

migration rejected from security.stackexchange.com Jul 18 '13 at 12:07

This question came from our site for Information security professionals. Votes, comments, and answers are locked due to the question being closed here, but it may be eligible for editing and reopening on the site where it originated.

closed as off-topic by Zoredache, slhck Jul 18 '13 at 12:07

  • This question does not appear to be about computer software or computer hardware within the scope defined in the help center.
If this question can be reworded to fit the rules in the help center, please edit the question.

1  
This probably should have been to serverfault, not superuser. –  Zoredache Jul 18 '13 at 6:01

1 Answer 1

dont do it, because it will not work, IMHO. puppet is not the right tool for that task.

what you want (and got advised) is a SSO-Solution

but I've been specifically instructed to use Puppet.

you can tell your instructors: it! will! not! work!

share

Not the answer you're looking for? Browse other questions tagged or ask your own question.