|
From: | Ryan Anderson |
Subject: | Re: updating users only in passwd file |
Date: | Mon, 05 Jan 2004 10:12:39 -0600 |
You can also try a cfengine config file that does this:
1) Copy a shadow file to the local system only containing the entries to
change, use a variable like $destfile. You can use cfengine's class structure to
copy out one formatted for each OS, domain, whatever this way--just make sure to
chmod/chown it securely.
2) Then have an editfiles section like this (lifted from the cfengine
reference):
editfiles:
linux::
{ /etc/shadow SplitOn ":" ForEachLineIn "$(destfile)" ReplaceLinesMatchingField "1" EndLoop } The new shadow password will be copied out when its changed (use checksum),
and the editfiles will update the local shadow file. Does this help?
RCA
-- Ryan C. Anderson Unix Administrator United Defense LP Desk: 763-572-6684 Mobile: 612-419-9362 Pager: 952-235-9936 |
[Prev in Thread] | Current Thread | [Next in Thread] |