I want my other users to view the "read-only" Devices (plugin), with only the device name and device status (up or down. I modified the "Devices" plugin to suit my requirements and remove the headers from the script leaving only hosts status and filter options.
First, is to create an autologin.php in your cacti folder using the code below:
<?php
$_REQUEST["action"]="login";
$_POST["login_username"]='username';
$_POST["login_password"]='password';
$_SERVER["HTTP_REFERER"]='/plugins/devices/devices.php';
include "index.php";
?>
Call the script from your browser, and it will direct you to your http://your-server-ip/cacti/plugins/devices.php. The problem here is when you click again the 'superlinks tab', you will get an 'Access Denied'. To fix this, insert a code on your devices.php to call the autologin.php when opening the devices.php.
include_once("./autologin.php");
Then load the "http://your-server-ip/cacti/plugins/devices/devices.php" on the main Cacti's 'superlinks', you can now re-click the superlinks without getting an "Access Denied" error.
No comments:
Post a Comment