Hi, Dave The snmpd.conf list as following:
# Second, map the security names into group names: # sec.model sec.name group Groupv1 v1 helloworld #group Groupv2c v2c local group Groupv3 usm leelin #### # Third, create a view for us to let the groups have rights to: # incl/excl subtree mask view all included .1.3.6 80 view if2 included .1.3.6.1.4.1.310 # context sec.model sec.level match read write notif #access MyROGroup "" any noauth exact all none none access Groupv1 "" any noauth exact all all none access Groupv3 "interface" usm auth exact if2 if2 if2 #rwuser leelin auth .1 createUser leelin MD5 "authpass" DES "privpass" -----邮件原件----- 发件人: [email protected] [mailto:[email protected]] 代表 Dave Shield 发送时间: 2009年5月4日 15:57 收件人: Kang Chen 抄送: [email protected] 主题: Re: 答复: how to configure and use 'context'? 2009/5/4 Kang Chen <[email protected]>: > I use the mib2c.iterator.conf to generate the c code, and in the function > initialize_table_exampleTable(), I add > reg->contextName = strdup("interface") Yup - that looks about right. Just to make sure, try walking the nsModuleName object. You should see something registered for your "interface" context (as well as all of the standard stuff). > But when I try to get some information within this table, snmpd hints ‘Error > in packet > > Reason: authorizationError (access denied to that object)’ That may well be access control, then. Please post the full snmpd.conf file (suitably sanitised, if need be), so we can check it looks OK. Dave ------------------------------------------------------------------------------ Register Now & Save for Velocity, the Web Performance & Operations Conference from O'Reilly Media. Velocity features a full day of expert-led, hands-on workshops and two days of sessions from industry leaders in dedicated Performance & Operations tracks. Use code vel09scf and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf _______________________________________________ Net-snmp-coders mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/net-snmp-coders
