Peter Meier
2010-Aug-08 16:57 UTC
[Puppet Users] Re: [Puppet-dev] Setting a user''s password with puppet
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1> Does anybody know how I can set a user''s password with puppet without > knowing what the hash will be? There is code I''ve tried from here: > > http://groups.google.com/group/puppet-users/browse_thread/thread/fa919b524c4a9323 > > But it does not seem to work, I think because the way the hash is set > on my target machine (ubuntu 9.04) is different to the way the hash is > generated on the puppet master. Is there another (hopefully simpler!) > way to do this?you could always write a function that generates you the correct hash depending on the operatingsystem fact. But this would mean that you will need to have the password in (semi-)plaintext in your manifests. Any other option is similar to that one, as in the nature of the user-provider and probably this is related to the way how the different usermod work, the password has to be encrypted in the hash of the targeted system. If the exec doesn''t work for you, you might also want to examine why it doesn''t work (what errors do you get?) and change it so that it work on your different distros. cheers pete PS: I''m taking that thread to puppet-users as much more people might have an answer there to that kind of questions. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkxe4fQACgkQbwltcAfKi38YDwCgpoX5cbMlKsDNqr74TL/i8Eqk 0+gAnA2fmfHdTrRMpgtzEYP0OUwgHaTi =MJl9 -----END PGP SIGNATURE----- -- 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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.