RE: Traphandler problem when snmptrapd runs a service

"Matson, Stuart (UK)" <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <[email protected]>
I've written a small C++ program and now execute this to handle traps. Still have the same problem though. Works OK when snmptrapd is run on the command line but not as a service. I set the permission on the file so everything has read/write. I'm not sure what user the service runs as (how do I find that out?). Someone mentioned that the terminal will set up all the paths required, but services don't. I wonder if that has something to do with it. 

Stuart Matson
Senior Software Engineer

Electronics & Integrated Solutions
BAE Systems
Marconi Way
Rochester Kent ME1 2XX

BAE Systems (Operations) Limited
Registered Office: Warwick House, PO Box 87, Farnborough Aerospace Centre, Farnborough, Hants, GU14 6YU, UK
Registered in England & Wales No: 1996687

Email: [email protected]
Phone: +44 1634 204081

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Dave Shield
Sent: 24 July 2012 10:05
To: Matson, Stuart (UK)
Cc: [email protected]
Subject: Re: Traphandler problem when snmptrapd runs a service

----------------------! WARNING ! ---------------------- This message originates from outside our organisation, either from an external partner or from the internet.
Keep this in mind if you answer this message.
Follow the 'Report Suspicious Emails' link on IT matters for instructions on reporting suspicious email messages.
--------------------------------------------------------

On 24 July 2012 09:43, Matson, Stuart (UK) <[email protected]> wrote:
> I've discovered that 'execute' trap handling works fine if I start 
> snmptrapd on the command line. If snmptrapd is running as a service 
> however the 'execute' trap handling doesn't work (logging does still 
> work). I would prefer to run it as a service. Any ideas why it doesn't work?

What are the permissions on the command(s) that you are trying to run?
What user is the snmptrapd daemon running as?

Your original message referred to running the 'reboot' command.
Have you tried this with something simpler?
(E.g. a shell script that simply logs the incoming data to a file)

Dave


********************************************************************
This email and any attachments are confidential to the intended
recipient and may also be privileged. If you are not the intended
recipient please delete it from your system and notify the sender.
You should not copy it or use it for any purpose nor disclose or
distribute its contents to any other person.
********************************************************************


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Net-snmp-users mailing list
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.