SNMP v3 Privacy Passphrase textbox

Post general support questions here that do not specifically fall into the Linux or Windows categories.

Moderators: Developers, Moderators

Post Reply
drake
Posts: 3
Joined: Tue Jun 23, 2009 10:13 am

SNMP v3 Privacy Passphrase textbox

Post by drake »

Hi,
I am trying to launch cacti monitoring of a highly secured environment.
The policy is very strict regarding passwords etc. It requires me not to show any passwords in GUI. Unfortunately privacy passphrase textbox provides a clearly visible passphrase.
I thought it shouldn't be very hard to change this in the code - just change the textbox type to 'password', but I got quite lost in the cacti code. Can somebody direct me where can I find this?
Thanks in advance
noname
Cacti Guru User
Posts: 1566
Joined: Thu Aug 05, 2010 2:04 am
Location: Japan

Re: SNMP v3 Privacy Passphrase textbox

Post by noname »

For 'Settings => General', change this line in 'include/global_settings' as follows:

Code: Select all

	"snmp_priv_passphrase" => array(
		"method" => "textbox_password",
		"friendly_name" => "SNMP Privacy Passphrase (v3)",
(There is a similar line in 'global_form.php', but seems to be unnecessary to change.)

However, this does not effect to 'Custom Data' settings in data templates.

To mask password fields, for example..
At function template_edit() in data_templates.php:

Code: Select all

<?php form_text_box("value_" . $field["data_name"],$old_value,"","");?>
to

Code: Select all

<?php form_text_box("value_" . $field["data_name"],$old_value,"","","", (array_search($field["data_name"],array("snmp_password","snmp_priv_passphrase"))!==FALSE ? "password" : ""));?>
(Add or delete fields in array() as you like.)

// Sorry my ugly workarounds...
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests