help-cfengine
[Top][All Lists]
Advanced

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

Re: Editfiles convergence bug


From: David J. Bianco
Subject: Re: Editfiles convergence bug
Date: 18 Feb 2003 10:05:13 -0500

[moving this to help-cfengine since maybe it's not actually a bug]

On Fri, 2003-02-14 at 11:32, Adrian Phillips wrote:
> >>>>> "David" == David J Bianco <bianco@jlab.org> writes:
> 
>     David> I've got a simple stanza like: BeginGroupIfNoLineMatching
>     David> "^root:<somepasswordhash>:0:0" ReplaceAll "^root:[^:]*:0:0"
>     David> With "root:<somepasswordhash>:0:0" EndGroup
> 
>     David> In English, if the root password hash isn't correct, I want
>     David> to change the hash without mucking around with anything
>     David> else in the line.  I think this should work, but when it
>     David> runs, I get:
> 
> The obvious but tidiest work around is :-
> 
> root:[^s][^o][^m]....:
> 
> otherwise I think this is intended,

Unfortunately, this doesn't work either.  In the case where the old
and new passwords happen to have at least one character in common and
in the same position, the expression doesn't match. ie, "xejt2" and
"fepl6" both have the 'e' in the second position.  

I wonder if it wouldn't be useful to add an "account" action to handle
password file entries.  Hmmm...

account:
        any::
                root    uid=0
                        gid=0
                        homedir=/
                        gecos="System Administrator"
                        passwdhash="jklfd278h93k7"
                        inform=yes

What do you guys think?

        David


-- 
David J. Bianco <bianco@jlab.org>
Thomas Jefferson National Accelerator Facility





reply via email to

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