NoAccess error in snmpset

I have a MIB object with read and write permission. The MIB section is as follows:

EnableHalt OBJECT-TYPE
  SYNTAX Integer32
  MAX-ACCESS read-write
  STATUS current
  DESCRIPTION "implemented in NetSnmpcodsMr.c file."
  DEFVAL { 0 }
::= { Scalars 4 }

When I make a set on this object, I get:

$ sudo snmpset -v 2c -c public localhost 1.3.6.1.4.1.8072.2.2.4.0 i 1
Error in packet.
Reason: noAccess
Failed object: NET-SNMP-MIB::netSnmp.2.2.4.0

When I get:

$ snmpget -v 2c -c public localhost 1.3.6.1.4.1.8072.2.2.4.0
NET-SNMP-MIB::netSnmp.2.2.4.0 = INTEGER: 1

Everything is fine!

In snmpd.conf, I added the line:

rwcommunity public localhost

Problem with noAccess. I am using net snmp 5.4.2.1 on Ubuntu

What am I doing wrong? Please advice Thanks Gil

+5
source share
5 answers

It's nine months since you asked about it, but in case it is helpful ...

Is your community line right? You specified it as " public", which is a read-only public string. Perhaps it should be " private" instead, this is the default read and write string.

+6

:

snmpget -v 2c -c public localhost 1.3.6.1.4.1.8072.2.2.4.0 NET-SNMP-MIB::netSnmp.2.2.4.0
+1

snmpd.conf, . .

rwcommunity public
0

noAccess ( notWritable) VACM snmpd.conf. com2sec, , . , / ; VACM; OID ; , , . noError, return noAccess, , IP- , .

0