snmp error in packet. reason noaccess

Hello Expert,

I try to use snmpset with below command

snmpset -v 3 -c public -u netadmin -l authPriv -a MD5 -A password localhost .1.3.6.1.4.1.88888.1.9.1.1.2 s "111111"

the OID .1.3.6.1.4.1.88888.1.9.1.1.2 is read-write

Thank you.
trazodoneAsked:
Who is Participating?
 
arnoldConnect With a Mentor Commented:
Com2sec use this to define snmpv2 community, network.

com2sec local any newscommunity

Do you have rwuser netadmin ? Instead of rouser?
0
 
arnoldConnect With a Mentor Commented:
The SNMP community public is a read-only and should not be changed.
Make sure you have a read/write community and it is used with the -c parameter.
You are using snmpv3.
Check whether when using snmpv3 specifying a community is necessary.
Exclude the -c public and see if the behavior changes
0
 
trazodoneAuthor Commented:
I used command sudo ./snmpwalk -v 3 -u netadmin -l authPriv -a MD5 -A password -x DES -X password localhost .1.3.6.1.4.1.88888.1

and I have got info SNMPv2-SMI::enterprises.88888.1.7.1.0 = Hex-STRING: 00

Next, I tried to snmpset the OID .1.3.6.1.4.1.88888.1.7.1.0

sudo ./snmpset -v 3 -u netadmin -l authPriv -a MD5 -A password -x DES -X password localhost .1.3.6.1.4.1.88888.1.7.1.0 s "OPEN"
Error in packet.
Reason: noAccess
Failed object: SNMPv2-SMI::enterprises.88888.1.7.1.0

without -c public. I have got the same error

I am wondering it seems OID .1.3.6.1.4.1.88888.1.7.1.0 dows not exist?

Thank you.
0
Improve Your Query Performance Tuning

In this FREE six-day email course, you'll learn from Janis Griffin, Database Performance Evangelist. She'll teach 12 steps that you can use to optimize your queries as much as possible and see measurable results in your work. Get started today!

 
trazodoneAuthor Commented:
Additional

I tried snmpget and seems OID .1.3.6.1.4.1.88888.1.7.1.0 exist

sudo ./snmpget -v 3 -u netadmin -l authPriv -a MD5 -A password -x DES -X password localhost .1.3.6.1.4.1.88888.1.7.1.0
SNMPv2-SMI::enterprises.88888.1.7.1.0 = Hex-STRING: 00
0
 
trazodoneAuthor Commented:
Data types ids hex-string so I tried with option x

sudo ./snmpset -v 3 -u netadmin -l authPriv -a MD5 -A password -x DES -X password localhost .1.3.6.1.4.1.88888.1.7.1.0 x "OPEN"
.1.3.6.1.4.1.88888.1.7.1.0: Bad value notation (OPEN)

and

sudo ./snmpset -v 3 -u netadmin -l authPriv -a MD5 -A password -x DES -X password localhost .1.3.6.1.4.1.88888.1.7.1.0 x "0x2D"
Error in packet.
Reason: noAccess

Not success :)
0
 
arnoldConnect With a Mentor Commented:
You do not need to run sudo, since you are using snmpv3 with auth.

Have not had a chance to check whether the OID you are trying to update ......

Do you have the option, to configure a read/write community as well as use snmpv2 to perform the same set attempt?
0
 
trazodoneAuthor Commented:
Without sudo

 ./snmpset -v 3 -u netadmin -l authPriv -a MD5 -A password -x DES -X password localhost .1.3.6.1.4.1.88888.1.7.1.0 x "01"
Error in packet.
Reason: noAccess
Failed object: SNMPv2-SMI::enterprises.88888.1.7.1.0

without sudo with -v 2c

./snmpset -v 2c -c public -u netadmin -l authPriv -a MD5 -A password -x DES -X password localhost .1.3.6.1.4.1.88888.1.7.1.0 x "01"
Timeout: No Response from localhost

look better but timeout

Will you plese guide how  to configure a read/write community?

Thank you
0
 
arnoldConnect With a Mentor Commented:
Try s instead of X when setting 'open'

String, hex data.
Try s '0x2D' as the new value.
0
 
trazodoneAuthor Commented:
./snmpset -v 2c -c public -u netadmin -l authPriv -a MD5 -A password -x DES -X password localhost .1.3.6.1.4.1.88888.1.7.1.0 x "0x2D"
Timeout: No Response from localhost
0
 
trazodoneAuthor Commented:
My snmpd.conf contains

rouser netadmin
rouser netadmin
rwcommunity public

Restart snmpd and snmpset is timeout

Thanks
0
 
arnoldConnect With a Mentor Commented:
Public should never be set as rw community.

Your netadmin are set as read only user which ....


Within snmpd.conf there is a seccontext

Common,y, there is a commented section dealing with defining community as read-write.
0
 
trazodoneAuthor Commented:
No I don't have rwuser netadmin and the snmpd.conf is empty file
0
 
trazodoneAuthor Commented:
I just modified rwuser netadmin. Restart snmpd and result is timeout. How do I add com2sec?

Thank you.
0
 
arnoldConnect With a Mentor Commented:
Where did you get the snmpd.conf which linux OS are you working on.

Usually the snmpd.conf includes an example settings but by default it is set to minimal information
snmpwalk -v 2c -s public localhost will only output the bare minimum, system name, system location, system operator

it indicates that additional configuration is needed using the com2sec where you can define different community strings, groups and networks from which it can be queried.

rwuser netadmin
versus  
rouser netadmin as you posted should change the behavior.....

but snmpd.conf should not be empty, this is where all the OID are defined .....
0
 
trazodoneAuthor Commented:
I add

#       sec.name  source          community
com2sec local     localhost       COMMUNITY

to snmpd.conf

Result=timeout
0
 
trazodoneAuthor Commented:
Command

 ./snmpwalk -v 2c -c public localhost
Timeout: No Response from localhost

Location of file snmpd.conf

/usr/local/share/snmp/snmpd.conf

This file may not be a correct snmpd.conf I am finding other snmpd.conf
0
 
trazodoneAuthor Commented:
I found snmpd.conf example file which contains com2sec. How can I bring this file to be a snmpd.conf of snmpd application?

File located here
/home/tee/alarmbox/applications/net-snmp-5.7.3/python/netsnmp/tests/snmpd.conf
0
 
trazodoneAuthor Commented:
My linux

uname -a
Linux ubuntu 3.13.0-74-generic #118~precise1-Ubuntu SMP Fri Dec 18 10:39:27 UTC 2015 i686 i686 i386 GNU/Linux
0
 
arnoldConnect With a Mentor Commented:
often, the snmpd.conf file is in /etc/snmp/snmpd.conf

http://manpages.ubuntu.com/manpages/wily/man5/snmpd.conf.5.html

try the following, run
snmpconf -g basec_setup

This is a perl script that will prompt you for information and then will create the snmpd.conf file.......
0
 
trazodoneAuthor Commented:
I used snmpconf which create snmpd.conf at path

/usr/local/share/snmp

snmpd.conf content below

###########################################################################
#
# snmpd.conf
#
#   - created by the snmpconf configuration program
#









###########################################################################
# SECTION: Access Control Setup
#
#   This section defines who is allowed to talk to your running
#   snmp agent.

# rwuser: a SNMPv3 read-write user
#   arguments:  user [noauth|auth|priv] [restriction_oid]

rwuser  netadmin

# rwcommunity: a SNMPv1/SNMPv2c read-write access community name
#   arguments:  community [default|hostname|network/bits] [oid]

rwcommunity  public
0
 
trazodoneAuthor Commented:
Update

tee@ubuntu:~/alarmbox/applications/net-snmp-5.7.3/apps$ ./snmpset -v 2c -c public -u netadmin -l authPriv -a MD5 -A password -x DES -X password 127.0.0.1 .1.3.6.1.4.1.88888.1.7.1.0 x "0x2D"
Error in packet.
Reason: notWritable (That object does not support modification)
Failed object: SNMPv2-SMI::enterprises.88888.1.7.1.0

I can confirm that files .c and .h config this OID read-write. Do you know how to check if OID can be modify?

Thank you.
0
 
trazodoneAuthor Commented:
My mistake the OID is read-only. Let me modify MIB file .c and .h and try again.

Thank you.
0
 
trazodoneAuthor Commented:
Hello I found another error

tee@ubuntu:/opt/snmp/bin$ ./snmpget -v 3 -u netadmin -l authPriv -a MD5 -A password -x DES -X password localhost .1.3.6.1.4.1.88888.1.7.1.0
SNMPv2-SMI::enterprises.88888.1.7.1.0 = STRING: "UNKNOWN_STATUS"

tee@ubuntu:/opt/snmp/bin$ ./snmpset -v 2c -c public -u netadmin -l authPriv -a MD5 -A password -x DES -X password 127.0.0.1 .1.3.6.1.4.1.88888.1.7.1 s "OPEN"
Error in packet.
Reason: noCreation (That table does not support row creation or that object can not ever be created)
Failed object: SNMPv2-SMI::enterprises.88888.1.7.1

Thank you.
0
 
trazodoneAuthor Commented:
Finally

./snmpset -v 2c -c public -u netadmin -l authPriv -a MD5 -A password -x DES -X password 127.0.0.1 .1.3.6.1.4.1.88888.1.7.1.0 s "OPEN"
SNMPv2-SMI::enterprises.88888.1.7.1.0 = STRING: "OPEN"

Seems it is working but when I tried snmpget

tee@ubuntu:/opt/snmp/bin$ ./snmpget -v 2c -c public -u netadmin -l authPriv -a MD5 -A password -x DES -X password localhost .1.3.6.1.4.1.88888.1.7.1.0
SNMPv2-SMI::enterprises.88888.1.7.1.0 = STRING: "UNKNOWN_STATUS"
tee@ubuntu:/opt/snmp/bin$

Do you have idea why it is "UNKNOWN_STATUS"

Thank you.
0
 
arnoldCommented:
In prior, the definition as hex string, open, is not valid. Your other attempts had 0x2D does setting that make a difference?
0
 
trazodoneAuthor Commented:
Hello

It is difference <mib>.c file so the x "0x2D" is not exist anymore. The new one is s "OPEN"

tee@ubuntu:/opt/snmp/bin$ ./snmpget -v 2c -c public -u netadmin -l authPriv -a MD5 -A password -x DES -X password localhost .1.3.6.1.4.1.88888.1.7.1.0
SNMPv2-SMI::enterprises.88888.1.7.1.0 = STRING: "UNKNOWN_STATUS"
tee@ubuntu:/opt/snmp/bin$
0
 
arnoldCommented:
I do not know which MIB you are using, in your prior response, the field type was indicated as HEX: String....
nor whether this SNMP OID when open is set, triggers an event at which point the status of the item is unknown.
0
 
trazodoneAuthor Commented:
Hello Arnold,

Finally I is working once I config the snmpd.config with com2sec. Thank you. I will soon close this topic. Do you have additional info?
0
 
arnoldCommented:
Info? I have, ir think I have broad knowledge, need to understand what additional info or concern, considerations you have in mind.
0
 
trazodoneAuthor Commented:
Thank you.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.