Re: SNMPGET specifying the community name
Irvs <[email protected]>
| Newsgroups | gmane.network.net-snmp.user |
|---|---|
| Message-ID | <[email protected]> |
Thanks Dave. I am sorry, the command I provided wasn't correct. It should work if I use the snmpwalk command instead of the snmpget or completed the OID string witht eh snmpget. With the current version I am using which is 5.0.8(from the FAQ file) I noticed a very weird behavior. I can successfully modify the community name. Looking at the snmpd.conf file. The input community name is written, even with the spaces. But since you mentioned about restarting the agent, after restarting it, if the community name string contains spaces only the string before the first blank space is written and saved. The remaining string after the first blank space is not saved. What do you think about this? Is this because I am using an old version? Thanks a lot!! -Irvs On Thu, Jan 7, 2010 at 6:46 PM, Dave Shield <[email protected]>wrote: > 2010/1/7 Irvs <[email protected]>: > > I can't seem to make it work, executing this command [snmpget -v2c -c > > "sample community" 10.10.10.9 enterprises] does not give me the right > return > > value. > > Well, no - it won't. > 'enterprises' is the *root* of a tree of information, > but there's nothing associated with this object itself. > Plus you'd need to specify the instance subidentifier anyway. > > snmpget .... enterprises > > will *always* fail - whether you use "public" or any other community > string. > > > > Do you guys have an idea where in the source code can I find the part > > where it reads the community name value for evaluation? > > Believe me - you do *not* want to start looking through the access > control code. It's not straightforward in the slightest. > > Just set you agent up with the following configuration > > rocommunity public > rocommunity someothercommunity > rocommunity "yet another community" > > and restart the agent. > Then you can experiment with running the same request, > using different community names, with and without spaces. > > They should all give the same results. > If they don't, it might be useful to know which version > of the agent you are working with. > > Dave > ------------------------------------------------------------------------------ This SF.Net email is sponsored by the Verizon Developer Community Take advantage of Verizon's best-in-class app development support A streamlined, 14 day to market process makes app distribution fast and easy Join now and get one step closer to millions of Verizon customers http://p.sf.net/sfu/verizon-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