Andrew Wasilczuk
2009-May-06 15:07 UTC
[Puppet Users] FreeBSD pw user provider password management
Hi all, Can someone tell me what is the reason for the pw user provider not supporting the password parameter? As far as I know one can pipe an encrypted password string to pw and it will set it as expected. As a workaround I''m using an exec to achieve this functionality: define users::freebsd_user($gid, $uid, $comment, $password, $shell) { user { $name: ensure => present, comment => $comment, gid => $gid, uid => $uid, password => $password, shell => $shell, notify => Exec["passwd_$name"]; } exec { "passwd_$name": path => "/bin:/sbin:/usr/bin:/usr/sbin", command => "echo ''$password'' | /usr/sbin/pw usermod $name -H 0", refreshonly => "true"; } } However it would be cleaner if the built-in type supported this. Is there a technical reason why this wasn''t done? Cheers, Andrew. -- . __/_/_ w: http://darq.com/ . __/_/_ t: 020 7100 1447 . / / e: support@darq.com --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Peter Burkholder
2009-May-06 15:47 UTC
[Puppet Users] Re: FreeBSD pw user provider password management
Is it this issue? http://projects.reductivelabs.com/issues/1511 You need to have ruby-shadow library and restart puppetd. -Peter On May 6, 2009, at 11:07 AM, Andrew Wasilczuk wrote:> > Hi all, > > Can someone tell me what is the reason for the pw user provider not > supporting the password parameter? As far as I know one can pipe an > encrypted password string to pw and it will set it as expected. > > As a workaround I''m using an exec to achieve this functionality: > > define users::freebsd_user($gid, $uid, $comment, $password, $shell) { > > user { $name: > ensure => present, > comment => $comment, > gid => $gid, > uid => $uid, > password => $password, > shell => $shell, > notify => Exec["passwd_$name"]; > } > > exec { "passwd_$name": > path => "/bin:/sbin:/usr/bin:/usr/sbin", > command => "echo ''$password'' | /usr/sbin/pw usermod > $name -H 0", > refreshonly => "true"; > } > } > > > However it would be cleaner if the built-in type supported this. Is > there a technical reason why this wasn''t done? > > > Cheers, > > > Andrew. > > -- > . __/_/_ w: http://darq.com/ > . __/_/_ t: 020 7100 1447 > . / / e: support@darq.com > > > > >-- Peter Burkholder AARP | Web Strategy & Operations | 601 E Street, NW | Washington, DC 20049 pburkholder@aarp.org | aim: peterbtech | ph: 202-434-3530 | cell: 202-344-7129 | --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Andrew Wasilczuk
2009-May-08 08:55 UTC
[Puppet Users] Re: FreeBSD pw user provider password management
Peter Burkholder wrote:> Is it this issue? > > http://projects.reductivelabs.com/issues/1511 > > You need to have ruby-shadow library and restart puppetd.Thanks for your reply Peter. Unfortunately this issue is talking about the useradd provider and I was asking about pw (which is the only option on FreeBSD). As far as I can tell the pw provider for the user type doesn''t support the password management feature at the moment and I was wandering why. Is it because of a technical issue or it just hasn''t been done yet? Cheers, Andrew. -- . __/_/_ w: http://darq.com/ . __/_/_ t: 020 7100 1447 . / / e: support@darq.com --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Luke Kanies
2009-May-11 22:37 UTC
[Puppet Users] Re: FreeBSD pw user provider password management
On May 8, 2009, at 3:55 AM, Andrew Wasilczuk wrote:> > Peter Burkholder wrote: >> Is it this issue? >> >> http://projects.reductivelabs.com/issues/1511 >> >> You need to have ruby-shadow library and restart puppetd. > > Thanks for your reply Peter. Unfortunately this issue is talking > about > the useradd provider and I was asking about pw (which is the only > option > on FreeBSD). As far as I can tell the pw provider for the user type > doesn''t support the password management feature at the moment and I > was > wandering why. Is it because of a technical issue or it just hasn''t > been done yet?Just hasn''t been done, apparently. -- The trouble with the rat race is that even if you win, you''re still a rat. -- Lily Tomlin --------------------------------------------------------------------- Luke Kanies | http://reductivelabs.com | http://madstop.com --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---