From d0d7d8552e7793af6ff0ad207774de7deaf94183 Mon Sep 17 00:00:00 2001 From: Brian Sidebotham Date: Mon, 2 Sep 2019 21:11:24 +0100 Subject: [PATCH] Fixed testing fping output when the LibreNMS user doesn't have a valid shell (#10567) --- LibreNMS/Validator.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LibreNMS/Validator.php b/LibreNMS/Validator.php index 92588e1bea..eac1a41421 100644 --- a/LibreNMS/Validator.php +++ b/LibreNMS/Validator.php @@ -251,7 +251,7 @@ class Validator public function execAsUser($command, &$output = null, &$code = null) { if (self::getUsername() === 'root') { - $command = 'su ' . Config::get('user') . ' -c "' . $command . '"'; + $command = 'su ' . Config::get('user') . ' -s /bin/sh -c "' . $command . '"'; } exec($command, $output, $code); }