mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Fixed testing fping output when the LibreNMS user doesn't have a valid shell (#10567)
This commit is contained in:
committed by
PipoCanaja
parent
c73e9cbcfb
commit
d0d7d8552e
@@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user