Re: snmpd doesn't response from compiled source.

姜宇 (Anthony Jiang) <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <[email protected]>
Thanks for Dave's advice for security, I would fix the problem later.

Now the first priority is to make snmpd work and get it load  the *.so
module.

I runned snmpconf, and created the snmp.conf and snmpd.conf and restart the
snmpd in /usr/local/sbin/snmpd with -f -Le option,
It still complains about access control information like the following:

Warning: no access control information configured.
  (Config search path:
/usr/local/etc/snmp:/usr/local/share/snmp:/usr/local/lib/snmp:/root/.snmp)
  It's unlikely this agent can serve any useful purpose in this state.
  Run "snmpconf -g basic_setup" to help you configure the snmpd.conf file
for this agent.
NET-SNMP version 5.6.1

and "snmpdget -v2c -c public localhost sysDescr.0" doesn't get any response.

I attatched the configuration file created by snmpconf , is there any
problem with that?


On Thu, Feb 17, 2011 at 1:53 AM, Ashwin Kumar <[email protected]>wrote:

> Ok, So much information in your response. :-)
>
> Will take care of it.
>
>
> Cheers,
>
> On Wed, Feb 16, 2011 at 11:15 PM, Dave Shield <[email protected]>wrote:
>
>> On 16 February 2011 17:21, Ashwin Kumar <[email protected]> wrote:
>> > Yes, you are correct.
>> > I was just trying to explain what must get into snmpd.conf file.
>>
>> > But, that was just my example.
>>
>> Fair enough.
>> But you didn't say it was an example - you said
>>
>> >   [snmpd.conf] *must* look like
>> >
>> > rocommunity public
>> > rwcommunity private
>>
>>                                        [my emphasis].
>> Which is both wrong - and dangerously so.
>>
>>
>> The snmpd.conf file "must" contain at least one of:
>>
>>    rocommunity
>>    rwcommunity
>>    rouser
>>    rwuser
>>                 (with a corresponding 'createUser' line in
>> /var/net-snmp/snmpd.conf)
>> or
>>    view/group/access  (plus either com2sec or createUser)
>>
>> i.e. at least one access control entry configured.
>> See snmpd.conf(5) for the full details.
>> But it doesn't have to contain any write support whatsoever.
>>
>>
>> > Yeah, I would not suggest anyone to do it. I understand the
>> > complexities of having poor, easily guessed name in the .conf.
>>
>> Excepot that you *did* suggest that Anthony did exactly this.
>>
>> If you want to suggest a simple access control config,
>> then
>>         rocommunity public
>>
>> is reasonable, simple and functional.
>> It might reveal something of your local setup to the world at large,
>> but it's unlikely that this would cause too much damage.
>>
>> But please *NEVER* suggest that people use "rwcommunity"
>> unless you *know* that:
>>    a)  they need SET support
>>    b)  they cannot use SNMPv3
>>    c)  they understand the implications
>>
>> For simply getting started, read-only access is more than sufficient.
>>
>> Dave
>>
>
>
>
> --
> -- Ashwin Kumar
> +91-974-054-7793
> (Sent from my iPad)
>



-- 
Best Wishes,
姜 宇 <[email protected]>
Anthony Jiang <[email protected]>

------------------------------------------------------------------------------
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb

_______________________________________________
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
snmp.conf (application/octet-stream, 1.5 KB)
###########################################################################
#
# snmp.conf
#
#   - created by the snmpconf configuration program
#
###########################################################################
# SECTION: Default Authentication Options
#
#   This section defines the default authentication
#   information.  Setting these up properly in your
#   ~/.snmp/snmp.conf file will greatly reduce the amount of
#   command line arguments you need to type (especially for snmpv3).

# defaultport: The default port number to use
#   This token specifies the default port number you want packets to 
#   be sent to and received from.
#   override: with -p on the command line.
#   arguments: portnum

defaultport  161

# defversion: The default snmp version number to use.
#   override: with -v on the command line.
#   arguments: 1|2c|3

defversion  2c

# defcommunity: The default snmpv1 and snmpv2c community name to use when needed.
#   If this is specified, you don't need to include the community
#   name as an argument to the snmp applications.  
#   override: with -c on the command line.
#   arguments: communityname

defcommunity  public









###########################################################################
# SECTION: Output style options
#
#   This section allows you to control how the output of the
#   various commands will be formated

# printnumericenums: Print enums numericly or textually
#   command line equivelent: -Oe
#   arguments: (1|yes|true|0|no|false)

printnumericenums  true
snmpd.conf (application/octet-stream, 2 KB)
###########################################################################
#
# snmpd.conf
#
#   - created by the snmpconf configuration program
#
###########################################################################
# SECTION: System Information Setup
#
#   This section defines some of the information reported in
#   the "system" mib group in the mibII tree.

# syslocation: The [typically physical] location of the system.
#   Note that setting this value here means that when trying to
#   perform an snmp SET operation to the sysLocation.0 variable will make
#   the agent return the "notWritable" error code.  IE, including
#   this token in the snmpd.conf file will disable write access to
#   the variable.
#   arguments:  location_string

syslocation  Chengdu

# syscontact: The contact information for the administrator
#   Note that setting this value here means that when trying to
#   perform an snmp SET operation to the sysContact.0 variable will make
#   the agent return the "notWritable" error code.  IE, including
#   this token in the snmpd.conf file will disable write access to
#   the variable.
#   arguments:  contact_string

syscontact  "Anthony Jiang <[email protected]>"

# sysservices: The proper value for the sysServices object.
#   arguments:  sysservices_number

sysservices 12









###########################################################################
# SECTION: Access Control Setup
#
#   This section defines who is allowed to talk to your running
#   snmp agent.

# rwuser: a SNMPv3 read-write user
#   arguments:  user [noauth|auth|priv] [restriction_oid]

rwuser  root noauth 

# rouser: a SNMPv3 read-only user
#   arguments:  user [noauth|auth|priv] [restriction_oid]

rouser  root noauth 

# rocommunity: a SNMPv1/SNMPv2c read-only access community name
#   arguments:  community [default|hostname|network/bits] [oid]

rocommunity  public  

# rwcommunity: a SNMPv1/SNMPv2c read-write access community name
#   arguments:  community [default|hostname|network/bits] [oid]

rwcommunity  public  


#act as a master agent
master	agentx
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.