Re: freeBSD User provider

Luke Kanies
Fri, 15 Jun 2007 14:16:41 -0000

On Jun 15, 2007, at 1:41 AM, ADNET Ghislain wrote:

> do you have any docs about writing type and providers ?
> i really do not see in useradd.rb or pw.rb how they manage to
> delete user for exemple ?

I haven''t yet written a document describing them, partially because I
had not until recently come up with a clean API definition.

However, that wouldn''t have helped you much in this case.  In order
to avoid massive code duplication, most of the code for user and
group providers is in respective base classes.  So, for pw, look in
puppet/provider/nameservice/pw.rb for the deletecmd method, which is
what''s used to build up the command line that deletes uesrs and groups.

Note that the same method is used for users and groups, so you should
override the method in the user/pw.rb and modify it there.

  --
  The world tolerates conceit from those who are successful, but not
  from anybody else.   -- John Blake
  ---------------------------------------------------------------------
  Luke Kanies | http://reductivelabs.com | http://madstop.com