Yes, it would.  However, the passwd file format is "<user>:x:<uid>:<gid>...." and I can't guarantee that the '<uid>' will be consistent accross all systems.  This is where I'm running into problems in how to preserve the '<uid>' field.

Regards,
         /\/elson



Adrian Phillips <[EMAIL PROTECTED]>
Sent by: [EMAIL PROTECTED]

07/27/2005 12:13 PM

To
Help-cfengine@gnu.org
cc
Subject
Re: Editing fields in /etc/passwd





>>>>> "David" == David E Nelson <[EMAIL PROTECTED]> writes:

   David> Looking through 'editfiles', I'm not seeing an easy way to
   David> edit a single field in /etc/passwd - I need to change the
   David> primary group for one account.  I can't just replace the
   David> entire line since the Gecos and home dir aren't consistent
   David> across systems.  Any ideas?

Won't something like the following work :-

ReplaceAll "^<user>:x:<groupid>:" With "<user>:x:<new groupid>:"

Sincerely,

Adrian Phillips

--
Who really wrote the works of William Shakespeare ?
http://www.pbs.org/wgbh/pages/frontline/shakespeare/


_______________________________________________
Help-cfengine mailing list
Help-cfengine@gnu.org
http://lists.gnu.org/mailman/listinfo/help-cfengine

_______________________________________________
Help-cfengine mailing list
Help-cfengine@gnu.org
http://lists.gnu.org/mailman/listinfo/help-cfengine

Reply via email to