Forum: Cfengine Help
Subject: Problem with special characters
Author: max_fr
Link to topic: https://cfengine.com/forum/read.php?3,21179,21179#msg-21179
Hi,
In order to change root password, i try to compare two md5 string with strcmp
function as following:
redhat::
"new_root_pwd" string => "$1$JNoH0WXg$3sF.c.I5aWMoAj8LpMtOW1";
...
classes:
"uppwd" not => strcmp("$(new_pwd)","$(old_pwd)");
files:
"/etc/shadow"
edit_line => set_user_field("root", 2, "$(new_pwd)");
Unfortunately, cfengine interprets the $ character and split the hash password
as following \\sF.c.I5aWMoAj8LpMtOW1
Also, even using the backslash or the escape function, the password is
truncated.
Does anyone have a solution for protecting the md5 password?
Thanks
Max
_______________________________________________
Help-cfengine mailing list
[email protected]
https://cfengine.org/mailman/listinfo/help-cfengine