Re: pass through not working in snmpd

2010-11-10 Thread Daniel Leicht
Hi Dave,

It seems it was the user issue, I removed the "-u snmp" from
/etc/init.d/snmpd, but forgot to remove it from /etc/default/snmpd .
Now it's removed and it looks like it's working, Thanks alot!

Daniel.


On Wed, Nov 10, 2010 at 12:29 AM, Dave Shield wrote:

> On 9 November 2010 14:36, Daniel Leicht  wrote:
> > And when checking the traffic in wireshark, I can see the following:
> > 48977 2321.852836 10.0.0.183 10.0.0.151 SNMP set-request
> 1.3.6.1.4.1.5.1.10
> > 48978 2321.856039 10.0.0.151 10.0.0.183 SNMP report
> 1.3.6.1.6.3.15.1.1.3.0
>
> Sudden thought - you are seeing a *report* being sent back?
> Rather than a "response" packet?
>
> That sounds as if the request is being rejected (as part of the SNMPv3
> processing) before it gets as far as the varbind processing.
>
> Are you sure that the agent isn't logging any sort of error?
>
> It might be worth running the agent using '-Dsnmpv3' to see if that
> shows anything useful.
>
> Dave
>
--
The Next 800 Companies to Lead America's Growth: New Video Whitepaper
David G. Thomson, author of the best-selling book "Blueprint to a 
Billion" shares his insights and actions to help propel your 
business during the next growth cycle. Listen Now!
http://p.sf.net/sfu/SAP-dev2dev___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Re: pass through not working in snmpd

2010-11-10 Thread Daniel Leicht
Hi Dave,

All the directories are 777 or 755 (I checked one by one).

/mnt/usb/project/bin/snmp is a soft link to a binary file,
I tried putting the binary file there directly, and also tried a shell
scripts that prints to a file that it ran (but it didn't print anything).

Evenatually I want it to be a shell script (but for now its binary).

Any guesses?

Thanks,
Daniel.

On Tue, Nov 9, 2010 at 6:35 PM, Dave Shield wrote:

> On 9 November 2010 16:28, Daniel Leicht  wrote:
> > These are the commands result:
> > # snmpget -v3 -u snmpuser 10.0.0.151 .1.3.6.1.4.1.5.1.10
> > Timeout: No Response from 10.0.0.151.
> > # snmpget -v3 -u snmpuser 10.0.0.151 sysUpTime.0
> > DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (1599) 0:00:15.99
>
> OK - so the 'snmpuser' is indeed set up correctly.
>  (Sorry for doubting you, but it's often worth checking the obvious
> things first)
>
>
> What are the permissions on the file /mnt/usb/project/bin/snmp   ?
> What are the permissions on the directory /mnt/usb/project/bin/   ?
>   (and on /mnt/usb/project,  /mnt/usb/,  /mnt, and / ?)
>
> What type of file is /mnt/usb/project/bin/snmp   ?
>  (binary?  shell script?  perl script?  etc)
>
> Dave
>
--
The Next 800 Companies to Lead America's Growth: New Video Whitepaper
David G. Thomson, author of the best-selling book "Blueprint to a 
Billion" shares his insights and actions to help propel your 
business during the next growth cycle. Listen Now!
http://p.sf.net/sfu/SAP-dev2dev___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Re: pass through not working in snmpd

2010-11-09 Thread Dave Shield
On 9 November 2010 14:36, Daniel Leicht  wrote:
> And when checking the traffic in wireshark, I can see the following:
> 48977 2321.852836 10.0.0.183 10.0.0.151 SNMP set-request 
> 1.3.6.1.4.1.5.1.10
> 48978 2321.856039 10.0.0.151 10.0.0.183 SNMP report 1.3.6.1.6.3.15.1.1.3.0

Sudden thought - you are seeing a *report* being sent back?
Rather than a "response" packet?

That sounds as if the request is being rejected (as part of the SNMPv3
processing) before it gets as far as the varbind processing.

Are you sure that the agent isn't logging any sort of error?

It might be worth running the agent using '-Dsnmpv3' to see if that
shows anything useful.

Dave

--
The Next 800 Companies to Lead America's Growth: New Video Whitepaper
David G. Thomson, author of the best-selling book "Blueprint to a 
Billion" shares his insights and actions to help propel your 
business during the next growth cycle. Listen Now!
http://p.sf.net/sfu/SAP-dev2dev
___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Re: pass through not working in snmpd

2010-11-09 Thread Dave Shield
On 9 November 2010 16:54, Daniel Leicht  wrote:
> Hi Dave,
> All the directories are 777 or 755 (I checked one by one).
> /mnt/usb/project/bin/snmp is a soft link to a binary file,

I presume you've checked the permissions on the target
(binary and directory path) as well?


> I tried putting the binary file there directly,

Ummm...
Does the binary use shared libraries?
It might be worth checking the permissions on those as well.


What user does the agent run as?
Can you run the binary (from the command line) as that same user?



> Any guesses?

As an alternative approach, try running the agent using the option
   -Ducd-snmp/pass

and re-run the snmpset command.
What (if anything) does the agent log?

Dave

--
The Next 800 Companies to Lead America's Growth: New Video Whitepaper
David G. Thomson, author of the best-selling book "Blueprint to a 
Billion" shares his insights and actions to help propel your 
business during the next growth cycle. Listen Now!
http://p.sf.net/sfu/SAP-dev2dev
___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Re: pass through not working in snmpd

2010-11-09 Thread Dave Shield
On 9 November 2010 16:28, Daniel Leicht  wrote:
> These are the commands result:
> # snmpget -v3 -u snmpuser 10.0.0.151 .1.3.6.1.4.1.5.1.10
> Timeout: No Response from 10.0.0.151.
> # snmpget -v3 -u snmpuser 10.0.0.151 sysUpTime.0
> DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (1599) 0:00:15.99

OK - so the 'snmpuser' is indeed set up correctly.
  (Sorry for doubting you, but it's often worth checking the obvious
things first)


What are the permissions on the file /mnt/usb/project/bin/snmp   ?
What are the permissions on the directory /mnt/usb/project/bin/   ?
   (and on /mnt/usb/project,  /mnt/usb/,  /mnt, and / ?)

What type of file is /mnt/usb/project/bin/snmp   ?
  (binary?  shell script?  perl script?  etc)

Dave

--
The Next 800 Companies to Lead America's Growth: New Video Whitepaper
David G. Thomson, author of the best-selling book "Blueprint to a 
Billion" shares his insights and actions to help propel your 
business during the next growth cycle. Listen Now!
http://p.sf.net/sfu/SAP-dev2dev
___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Re: pass through not working in snmpd

2010-11-09 Thread Daniel Leicht
These are the commands result:

# snmpget -v3 -u snmpuser 10.0.0.151 .1.3.6.1.4.1.5.1.10
Timeout: No Response from 10.0.0.151.

# snmpget -v3 -u snmpuser 10.0.0.151 sysUpTime.0
DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (1599) 0:00:15.99

And all I have in /var is /var/lib/snmp/snmpd.conf:

sheevaplug-debian:/opt/project# cat /var/lib/snmp/snmpd.conf
#
# net-snmp (or ucd-snmp) persistent data file.
#

# STOP STOP STOP STOP STOP STOP STOP STOP STOP
#
#   DO NOT EDIT THIS FILE 
#
# STOP STOP STOP STOP STOP STOP STOP STOP STOP

#
# DO NOT STORE CONFIGURATION ENTRIES HERE.
# Please save normal configuration tokens for snmpd in
SNMPCONFPATH/snmpd.conf.
# Only "createUser" tokens should be placed here by snmpd administrators.
# (Did I mention: do not edit this file?)
#










createUser snmpuser MD5 "abcdefgh123456" DES




usmUser 1 3 0x80001f88804d768079b236c2e0 0x736e6d707573657200
0x736e6d707573657200 NULL .1.3.6.1.6.3.10.1.1.2
0xe3702813d2b8ed0fddc5b64ed3714abd .1.3.6.1.6.3.10.1.2.2
0xe3702813d2b8ed0fddc5b64ed3714abd ""
setserialno 1924988301
##
#
# snmpNotifyFilterTable persistent data
#
##


##
#
# ifXTable persistent data
#
ifXTable .1 14:0 18:0x $
ifXTable .2 14:0 18:0x $
ifXTable .3 14:0 18:0x $
##


engineBoots 51
oldEngineID 0x80001f88804d768079b236c2e0

Thanks for the help!



On Tue, Nov 9, 2010 at 4:57 PM, Dave Shield wrote:

> On 9 November 2010 14:36, Daniel Leicht  wrote:
> > I'm trying to make snmpd run a script everytime that someone gets/sets
> the
> > oids under 1.3.6.1.4.1.5.1.
> > An example snmpset command that I use is:
> > snmpset -v3 -u snmpuser 10.0.0.151 .1.3.6.1.4.1.5.1.10 string "TEST"
>
> Is it just this OID that's failing?
> Can you see anything else (e.g. sysUpTime.0), when using this user?
>
>
> > my snmpd.conf:
> >
> ###
> > pass  .1.3.6.1.4.1.5.1 /mnt/usb/project/bin/snmp
> > rwuser  snmpuser noauth
>
>
> Where are you creating the 'snmpuser' user?
> What do you have in your /var/net-snmp/snmpd.conf file?
>
> Dave
>
--
The Next 800 Companies to Lead America's Growth: New Video Whitepaper
David G. Thomson, author of the best-selling book "Blueprint to a 
Billion" shares his insights and actions to help propel your 
business during the next growth cycle. Listen Now!
http://p.sf.net/sfu/SAP-dev2dev___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Re: pass through not working in snmpd

2010-11-09 Thread Dave Shield
On 9 November 2010 14:36, Daniel Leicht  wrote:
> I'm trying to make snmpd run a script everytime that someone gets/sets the
> oids under 1.3.6.1.4.1.5.1.
> An example snmpset command that I use is:
> snmpset -v3 -u snmpuser 10.0.0.151 .1.3.6.1.4.1.5.1.10 string "TEST"

Is it just this OID that's failing?
Can you see anything else (e.g. sysUpTime.0), when using this user?


> my snmpd.conf:
> ###
> pass  .1.3.6.1.4.1.5.1 /mnt/usb/project/bin/snmp
> rwuser  snmpuser noauth


Where are you creating the 'snmpuser' user?
What do you have in your /var/net-snmp/snmpd.conf file?

Dave

--
The Next 800 Companies to Lead America's Growth: New Video Whitepaper
David G. Thomson, author of the best-selling book "Blueprint to a 
Billion" shares his insights and actions to help propel your 
business during the next growth cycle. Listen Now!
http://p.sf.net/sfu/SAP-dev2dev
___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users