help-cfengine
[Top][All Lists]
Advanced

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

Re: Editing fields in /etc/passwd


From: david . nelson
Subject: Re: Editing fields in /etc/passwd
Date: Wed, 27 Jul 2005 12:38:44 -0500


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 <a.phillips@met.no>
Sent by: help-cfengine-bounces+david.nelson=ni.com@gnu.org

07/27/2005 12:13 PM

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





>>>>> "David" == David E Nelson <david.nelson@ni.com> 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


reply via email to

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