Skip to main content

Hello,

In some services, the following message appears instead of the command:

“Unable to hide passwords in command (Reason: Macro passwords cannot be detected)”

Even though there are no password-type macros.

The cause is in this file

/usr/share/centreon/src/Centreon/Domain/Monitoring/CommandLineTrait.php

Line 153, you must comment this block as follow :

        // if two macros are glued or separated by spaces, regex cannot detect properly password string
/** if (preg_match('/\(\.\*\)\s*\(\.\*\)/', $macroPattern)) {
throw MonitoringServiceException::macroPasswordNotDetected();
}
**/

With this you will have your command line shown as expected , and from my test, the password hiding is still working.

Be the first to reply!

Reply