help-cfengine
[Top][All Lists]
Advanced

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

Parse-time resolution of owner and group to UID/GID


From: Matthew Palmer
Subject: Parse-time resolution of owner and group to UID/GID
Date: Fri, 28 Oct 2005 08:26:00 +1000
User-agent: Mutt/1.5.9i

Further to my earlier discussions about creating users on the fly, I've now
come across another rather irritating problem -- it appears that usernames
specified in owner= and group= parameters (at least in the copy: section,
but I'd be fairly sure this applies to other sections as well) are turned
into numeric IDs at the parsing stage (or at least at some point before they
are used).  To give you a minor example:

control:
        actionsequence = ( shellcommands copy )

shellcommands:
        "/usr/sbin/adduser --system --disabled-password --gecos '' foo"

copy:
        /some/file/or/other
                dest=/somewhere/interesting
                owner=foo
                group=nobody
                mode=0644
                server=cfengine

In this instance, at the time of parsing the config file, the user 'foo'
does not exist, however by the time the copy action is run, the user *does*
exist.  As it stands, I have to run cfagent twice, which (in my situation,
at least) has some negative consequences (the cfagent run configures the
machine for it's place in the production network, rather than the deployment
environment, which stuffs future cfagent runs until all of this user
creation and copying hoo-hah is done with).

In the opinions of those who know the cfengine codebase reasonably well, how
hard (or ill-advised, for that matter) would it be to make name to UID
resolution take place at the time the owner/group statement was used, rather
than at parsing time?

Thanks,
- Matt




reply via email to

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