SPUG: Helpme!!! net:snmp
Jess Ross
dark_ros at hotmail.com
Fri Oct 1 19:09:02 CDT 2004
use Net::SNMP;
# pass read/write:private
my $ip_AP = '10.49.158.10';
my $sysContact = '1.3.6.1.2.1.1.4.0';
my $type = OCTET_STRING;
my $value = 'Jesus Ros';
my ($session, $error) = Net::SNMP->session( -hostname => shift || $ip_AP,
-community => shift ||
'private');
if (!defined($session)) {
printf("Error session: %s \n", $error);
exit 1;
}
my $result = $session->set_request( -varbindlist => [$sysContact, $type,
'$value']);
if (!defined($result)) {
printf("ERROR: %s.\n", $session->error());
$session->close();
exit 1;
}
$session->close;
exit 0;
-----------------------------------
It errors out saying:
ERROR: Received noSuchName(2) error-status at error-index 0.
----------------------------------------
I execute this scrip in host wireless towards a Access Point. I'm use the
community and pasword correct. Why it marks east error to me?.
_________________________________________________________________
Platica con tus amigos en linea con T1msn Messenger
http://messenger.t1msn.com.mx/
More information about the spug-list
mailing list