help-cfengine
[Top][All Lists]
Advanced

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

Passwd file sysncs / adding/removing users.


From: Jason Cannon
Subject: Passwd file sysncs / adding/removing users.
Date: Thu, 18 Jul 2002 19:28:00 -0400 (EDT)

I would like to be able to add/delete users from passwd files with
cfengine but have only found a way (a very nice way indeed) to replace
existing users passwords.  This comes in REAL handy for changing the root
password on all of your servers, but I would like to expand it to be able
to handle accounts that may come and go.

I could write a script to do this, but it doesn't seem to be the
"cfengine way."

Any ideas on adding/deleting users in the passwd file with cfengine?

Thanks!

Jason

-----
editfiles:
        # Sync passwd file.
        { /etc/passwd.test
                SplitOn ":"
                ForEachLineIn "$(master_inputs)/passwd.master"
                        ReplaceLinesMatchingField "1"
                        # Would like something like:
                        #  AppendIfNoSuchLineMatchingField "1"
                EndLoop
        }




reply via email to

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