It's fairly easy to programmatically rewrite the rwcommunity and rocommunity strings in snmpd.conf, then restart the agent through the normal init script mechanism. This is how my project works.
I can't answer your question regarding SET requests since I haven't used them myself. Ron ________________________________ From: Giuseppe Modugno [mailto:[email protected]] Sent: Tuesday, March 01, 2011 10:48 AM To: [email protected] Subject: Changing community strings automatically I have a Net-SNMP agent running on a Linux computer. I want to write a script/program that automatically change the community strings (I'm not interested in SNMPv3). Actually I know how to stop and restart the snmpd daemon. But how to change the community strings? I know they are written in snmpd.conf file. Do you have any suggestions how can I modify it changing the community strings? Is it possible to change the community strings through SNMP SET requests (of course, knowing the old community strings)? Is it possible to pass the community strings as command line parameters to snmpd, so I can change only the command line that starts the daemon? The information contained in this message may be privileged and confidential and protected from disclosure. If the reader of this message is not the intended recipient, or an employee or agent responsible for delivering this message to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify us immediately by replying to the message and deleting all copies. Thank you.
<<inline: logo.jpg>>
------------------------------------------------------------------------------ Free Software Download: Index, Search & Analyze Logs and other IT data in Real-Time with Splunk. Collect, index and harness all the fast moving IT data generated by your applications, servers and devices whether physical, virtual or in the cloud. Deliver compliance at lower cost and gain new business insights. http://p.sf.net/sfu/splunk-dev2dev
_______________________________________________ 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
