[Top][All Lists]

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

Re: updating users only in passwd file

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):
        {   /etc/shadow
            SplitOn ":"
            ForEachLineIn "$(destfile)"
                ReplaceLinesMatchingField "1"
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?
Ryan C. Anderson
Unix Administrator
United Defense LP
Desk: 763-572-6684
Mobile: 612-419-9362
Pager: 952-235-9936

reply via email to

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