On Tue, Mar 22, 2011 at 02:35, Dave Shield <[email protected]>wrote:
> On 21 March 2011 19:33, Donald Russell <[email protected]> wrote:
> >> What does your pass script look like?
> >
> > First, my snmpd.local.conf file has:
> > pass .1.3.6.1.4.1.15966.1 /usr/local/bin/passtest
> >
> > The passtest script is:
>
> [snip]
>
>
>
> > Yet in my /tmp.passtest.log file I see
> > -g .1.3.6.1.4.1.15966.1.1
> > RET=.1.3.6.1.4.1.15966.1.1; TYPE=integer; VALUE=42
> > So the script was invoked
> >
> > #snmpwalk .1.3.6.1.4.1.15966.1
> > SNMPv2-SMI::enterprises.15966.1 = No Such Instance currently exists at
> this OID
>
> Are you running this agent as root, or as a non-privileged user?
>
I believe the agent is running as root.
It is started automatically on system boot by chkconfig.
When I make config changes in snmpd.local.conf I "service snmpd restart" as
root.
#service snmpd status
snmpd (pid 1330) is running...
#ps -U root -u root u | grep 1330
root 1330 0.0 0.8 83308 8204 ? S<l 16:12 0:00
/usr/sbin/snmpd -Lsd -p /var/run/snmpd.pid -a
I run the snmpget/set/walk commands as a non-privileged user.
I also tried running snmpwalk as root and still get this error:
#snmpwalk .1.3.6.1.4.1.15966.1
SNMPv2-SMI::enterprises.15966.1 = No Such Instance currently exists at this
OID
> When I tried this (running the agent as myself), and walked this OID,
> the agent printed the error:
>
> can not create cache file
> /var/net-snmp/.snmp-exec-cache: Permission denied
>
That file is present with mode 644, owner:group is root:root and has a time
stamp matching the date/time I run the snmpwalk command
>
> and I didn't see anything.
> When I restarted the agent as root (with exactly the same setup),
> I could walk the tree as expected.
>
>
Damn! It's like when you take your car to the mechanic and the funny noise
doesn't happen.
> Might that be the problem you are seeing?
>
I don't think so.
> Does the agent log anything when you query the pass tree?
>
>
I do not see any messages in /var/log/snmpd.log. it has a timestamp of March
11, and is zero bytes in length.
FYI, this is version
#snmpd -v
NET-SNMP version: 5.3.2.2
Web: http://www.net-snmp.org/
Email: [email protected]
#cat /etc/redhat-release
Red Hat Enterprise Linux Server release 5.6 (Tikanga)
------------------------------------------------------------------------------
Enable your software for Intel(R) Active Management Technology to meet the
growing manageability and security demands of your customers. Businesses
are taking advantage of Intel(R) vPro (TM) technology - will your software
be a part of the solution? Download the Intel(R) Manageability Checker
today! http://p.sf.net/sfu/intel-dev2devmar
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders