Template:FAQ:Applications 12

From Net-SNMP Wiki
Revision as of 09:48, 28 May 2009 by Dts12 (Talk | contribs) (Latest FAQ revision - preparing for 5.5 release)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

This is actually the same as the previous question - it just isn't particularly obvious, particularly when using SNMPv1. A typical example of this effect would be

       $ snmpget -v1 -c public localhost sysLocation.0
       sysLocation.0 = somewhere nearby
       
$ snmpset -v1 -c public localhost sysLocation.0 s "right here" Error in packet. Reason: (noSuchName) There is no such variable name in this MIB. This name doesn't exist: sysLocation.0

Trying the same request using SNMPv2 or above is somewhat more informative:

       $ snmpset -v 2c -c public localhost
               sysLocation.0 s "right here"
       Error in packet.
       Reason: notWritable

The SNMPv1 error 'noSuchName' actually means: "You can't do that to this variable" rather than "this variable doesn't exist".
It may be the case that it doesn't exist at all. It may exist but you don't have access to it (although different administrative credentials might be accepted). Or it may exist, but you simply can't perform that particular operation (e.g. changing it).
Similarly, the SNMPv2 error 'notWritable' means "not writable in this particular case" rather than "not writable under any circumstances".

If you are sure that the object is both defined as writable, and has been implemented as such, then you probably need to look at the agent access control. See the AGENT section for more details.
But see the next entry first.