help-cfengine
[Top][All Lists]
Advanced

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

Re: updating users only in passwd file


From: Ted Zlatanov
Subject: Re: updating users only in passwd file
Date: Mon, 29 Dec 2003 11:04:28 -0500
User-agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3.50 (usg-unix-v)

On Tue, 23 Dec 2003, ajacoutot@dioranews.com wrote:

> I've search google but couldn't find any definitive solution about
> how to achieve what I need with cfengine.  Basically, I am looking
> for a way to update passwd files on all stations using cfengine. It
> works with no problem with the copy: command, but what I would like
> to do is to only add/update/delete passwd entries which UID is
> superior or equal to 1000 (basically, users entries, not root, bin,
> www.....).  Did anyone find a nice solution on how to to this ?

There are two ways that I've done this:

1) keep a "stub" for each machine, overwrite /etc/passwd with it, and
   append your custom entries then (you can also have a marker in the
   regular /etc/passwd and edit it in place).  This can be done
   entirely within cfengine.

2) cfperl (http://lifelogs.com/cfperl) has specific functionality to
   add/delete/change users with the user{add,del,mod} utilities; I
   wrote that functionality precisely because I needed what you
   describe above.

You could also use a network directory service such as LDAP or NIS,
but I assume you have a reason for locally complete /etc/passwd files.

Ted




reply via email to

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