diff --git a/pandora_console/godmode/agentes/agent_wizard.wmi_explorer.php b/pandora_console/godmode/agentes/agent_wizard.wmi_explorer.php index 99fb1e5c54..abdcbbecaa 100644 --- a/pandora_console/godmode/agentes/agent_wizard.wmi_explorer.php +++ b/pandora_console/godmode/agentes/agent_wizard.wmi_explorer.php @@ -57,7 +57,7 @@ if ($wmiexplore) { if (enterprise_installed()) { if ($server_to_exec != 0) { $server_data = db_get_row('tserver','id_server', $server_to_exec); - exec("ssh root@" . $server_data['ip_address'] . " '" . $wmi_processes . "'", $output, $rc); + exec("ssh pandora_exec_proxy@" . $server_data['ip_address'] . " '" . $wmi_processes . "'", $output, $rc); } else { exec($wmi_processes, $output); @@ -94,7 +94,7 @@ if ($wmiexplore) { if (enterprise_installed()) { if ($server_to_exec != 0) { $server_data = db_get_row('tserver','id_server', $server_to_exec); - exec("ssh root@" . $server_data['ip_address'] . " '" . $wmi_services . "'", $output, $rc); + exec("ssh pandora_exec_proxy@" . $server_data['ip_address'] . " '" . $wmi_services . "'", $output, $rc); } else { exec($wmi_services, $output); @@ -124,7 +124,7 @@ if ($wmiexplore) { if (enterprise_installed()) { if ($server_to_exec != 0) { $server_data = db_get_row('tserver','id_server', $server_to_exec); - exec("ssh root@" . $server_data['ip_address'] . " '" . $wmi_disks . "'", $output, $rc); + exec("ssh pandora_exec_proxy@" . $server_data['ip_address'] . " '" . $wmi_disks . "'", $output, $rc); } else { exec($wmi_disks, $output); diff --git a/pandora_console/include/ajax/events.php b/pandora_console/include/ajax/events.php index d29289ecb3..4f28012b2b 100644 --- a/pandora_console/include/ajax/events.php +++ b/pandora_console/include/ajax/events.php @@ -139,7 +139,7 @@ if ($perform_event_response) { $return_val = array(); $return_val['correct'] = false; - $exec_val = system("ssh root@" . $server_data['ip_address'] . " \"" . $command . " 2>&1\"", $ret_val); + $exec_val = system("ssh pandora_exec_proxy@" . $server_data['ip_address'] . " \"" . $command . " 2>&1\"", $ret_val); if ($ret_val != 0) { $return_val['message'] = "Conection error"; diff --git a/pandora_console/include/functions.php b/pandora_console/include/functions.php index 3472b0f567..057d6b4561 100644 --- a/pandora_console/include/functions.php +++ b/pandora_console/include/functions.php @@ -1601,7 +1601,7 @@ function get_snmpwalk($ip_target, $snmp_version, $snmp_community = '', if (enterprise_installed()) { if ($server_to_exec != 0) { $server_data = db_get_row('tserver','id_server', $server_to_exec); - exec("ssh root@" . $server_data['ip_address'] . " \"" . $command_str . "\"", $output, $rc); + exec("ssh pandora_exec_proxy@" . $server_data['ip_address'] . " \"" . $command_str . "\"", $output, $rc); } else { exec($command_str, $output, $rc); diff --git a/pandora_console/include/functions_snmp_browser.php b/pandora_console/include/functions_snmp_browser.php index 9da6d75881..417cd135fa 100644 --- a/pandora_console/include/functions_snmp_browser.php +++ b/pandora_console/include/functions_snmp_browser.php @@ -198,7 +198,7 @@ function snmp_browser_get_tree ($target_ip, $community, $starting_oid = '.', $ve else { $command = $snmpwalk_bin . " -m ALL -M +" . escapeshellarg($config['homedir'] . "/attachment/mibs") . " -Cc -c " . escapeshellarg($community) . " -v " . escapeshellarg($version) . " " . escapeshellarg($target_ip) . " " . escapeshellarg($starting_oid) . " 2> " . $error_redir_dir; } - exec("ssh root@" . $server_data['ip_address'] . " \"" . $command . "\"", $output, $rc); + exec("ssh pandora_exec_proxy@" . $server_data['ip_address'] . " \"" . $command . "\"", $output, $rc); } else { $oid_tree = array('__LEAVES__' => array()); diff --git a/pandora_console/pandoradb_data.sql b/pandora_console/pandoradb_data.sql index 7e0f84dee6..8047512f4d 100644 --- a/pandora_console/pandoradb_data.sql +++ b/pandora_console/pandoradb_data.sql @@ -1148,7 +1148,7 @@ INSERT INTO `tagent_custom_fields` VALUES (1,'Serial Number',0,0),(2,'Depar INSERT INTO `ttag` VALUES (1,'network','Network equipment','http://artica.es','',''),(2,'critical','Critical modules','','',''),(3,'dmz','DMZ Network Zone','','',''),(4,'performance','Performance anda capacity modules','','',''),(5,'configuration','','','',''); -INSERT INTO `tevent_response` VALUES (1,'Ping to host','Ping to the agent host','ping -c 5 _agent_address_','command',0,620,500,0,''),(2,'SSH to host','Connect via SSH to the agent','http://localhost:8022/anyterm.html?param=_User_@_agent_address_','url',0,800,450,0,'User'),(3,'Create incident from event','Create a incident from the event with the standard incidents system of Pandora FMS','index.php?sec=workspace&sec2=operation/incidents/incident_detail&insert_form&from_event=_event_id_','url',0,0,0,1,''),(4,'Create Integria IMS incident from event','Create a incident from the event with integria incidents system of Pandora FMS. Is necessary to enable and configure the Integria incidents in Pandora FMS setup.','index.php?sec=workspace&sec2=operation/integria_incidents/incident&tab=editor&from_event=_event_id_','url',0,0,0,1,''),(5,'Restart agent','Restart the agent with using UDP protocol. To use this response is necessary to have installed Pandora FMS server and console in the same machine.','/usr/share/pandora_server/util/udp_client.pl _agent_address_ 41122 "REFRESH AGENT"','command',0,620,500,0,''),(6,'Ping to module agent host','Ping to the module agent host','ping -c 5 _module_address_','command',0,620,500,0,''); +INSERT INTO `tevent_response` VALUES (1,'Ping to host','Ping to the agent host','ping -c 5 _agent_address_','command',0,620,500,0,'',0),(2,'SSH to host','Connect via SSH to the agent','http://localhost:8022/anyterm.html?param=_User_@_agent_address_','url',0,800,450,0,'User',0),(3,'Create incident from event','Create a incident from the event with the standard incidents system of Pandora FMS','index.php?sec=workspace&sec2=operation/incidents/incident_detail&insert_form&from_event=_event_id_','url',0,0,0,1,'',0),(4,'Create Integria IMS incident from event','Create a incident from the event with integria incidents system of Pandora FMS. Is necessary to enable and configure the Integria incidents in Pandora FMS setup.','index.php?sec=workspace&sec2=operation/integria_incidents/incident&tab=editor&from_event=_event_id_','url',0,0,0,1,'',0),(5,'Restart agent','Restart the agent with using UDP protocol. To use this response is necessary to have installed Pandora FMS server and console in the same machine.','/usr/share/pandora_server/util/udp_client.pl _agent_address_ 41122 "REFRESH AGENT"','command',0,620,500,0,'',0),(6,'Ping to module agent host','Ping to the module agent host','ping -c 5 _module_address_','command',0,620,500,0,'',0); INSERT INTO `tupdate_settings` VALUES ('current_update', '412'), ('customer_key', 'PANDORA-FREE'), ('updating_binary_path', 'Path where the updated binary files will be stored'), ('updating_code_path', 'Path where the updated code is stored'), ('dbname', ''), ('dbhost', ''), ('dbpass', ''), ('dbuser', ''), ('dbport', ''), ('proxy', ''), ('proxy_port', ''), ('proxy_user', ''), ('proxy_pass', '');