help-cfengine
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: vipw with cfengine?


From: skaar
Subject: Re: vipw with cfengine?
Date: Wed, 27 Nov 2002 09:16:41 -0500
User-agent: Mutt/1.4i

* Kai Großjohann (kai.grossjohann@uni-duisburg.de) [021127 08:49]:
> skaar <skaar@aol.net> writes:
> 
> > what you can do is to set EDITOR to ed or ex and echo the your changes
> > to ed.
> 
> That's a good idea, but I was kind of hoping to be able to use the
> commands from the editfiles section in cfagent.conf.  They are nice
> and easy to understand.

provided that cfengine is the only thing that will update your password
file, you don't have to care much about the locking - you would:

actionsequence = ( editfiles.passwd shellcommands.passwd )

editfiles:
  passwd::
    { /etc/passwd
      [ whatever you want to do] 
      DefineClasses "run_pwconv"
    }

shellcommands:
  passwd.run_pwconv:: 
  "/usr/sbin/pwconv"

There is of cource a race if someone is editing the password file - you
can make that window somewhat smaller by having a separate run like
above with the actionsequence to ensure that they happen right after
eachother.

/skaar


> 
> -- 
> ~/.signature is: umop ap!sdn    (Frank Nobis)
> 
> 
> _______________________________________________
> Help-cfengine mailing list
> Help-cfengine@gnu.org
> http://mail.gnu.org/mailman/listinfo/help-cfengine

-- 
/skaar

+-------------------------------------------------------------------+
+----- skaar@aol.net                     kent skaar ----------------+
+----- internet services: infrastructure & security ----------------+
+-------------------------------------------------------------------+




reply via email to

[Prev in Thread] Current Thread [Next in Thread]