Forum: Cfengine Help
Subject: Re: Problem with special characters
Author: berntjernberg
Link to topic: https://cfengine.com/forum/read.php?3,21179,21187#msg-21187

Hi,

Can you use something like this:



bundle agent root_pwd_update
{
    vars:
        hpux::
            "local_root_passwd" string => "your-hpux-hash-here";

        redhat::
            "local_root_passwd" string => "your-redhat-hash-here";

    files:
        "/etc/shadow"
            edit_line => set_user_field("root","2","$(local_root_passwd)"),
            classes => if_repaired("pw_updated");

    reports:
        pw_updated::
            "The root password on $(sys.host) has been changed";
}



I use this on Solaris.

_______________________________________________
Help-cfengine mailing list
Help-cfengine@cfengine.org
https://cfengine.org/mailman/listinfo/help-cfengine

Reply via email to