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: Adrian Phillips
Subject: Re: Editing fields in /etc/passwd
Date: Wed, 27 Jul 2005 19:13:58 +0200
User-agent: Gnus/5.090016 (Oort Gnus v0.16) Emacs/21.3 (gnu/linux)

>>>>> "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/




reply via email to

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