Raspbian sudo warnings

Hi,

This is definitely on the Raspbian side (not LibreNMS), but hoping someone else has seen this, and knows how to fix it - as I’m having no luck.

Recently upgraded Raspbian on my RPi, as stretch was released. Now though, when I retrieve SNMP data, I get (for example), the following (from LibreNMS, or snmpwalk itself),

NET-SNMP-EXTEND-MIB::nsExtendOutLine."raspberry".1 = STRING:
NET-SNMP-EXTEND-MIB::nsExtendOutLine."raspberry".2 = STRING: We trust you have received the usual lecture from the local System
NET-SNMP-EXTEND-MIB::nsExtendOutLine."raspberry".3 = STRING: Administrator. It usually boils down to these three things:
NET-SNMP-EXTEND-MIB::nsExtendOutLine."raspberry".4 = STRING:
NET-SNMP-EXTEND-MIB::nsExtendOutLine."raspberry".5 = STRING:     #1) Respect the privacy of others.
NET-SNMP-EXTEND-MIB::nsExtendOutLine."raspberry".6 = STRING:     #2) Think before you type.
NET-SNMP-EXTEND-MIB::nsExtendOutLine."raspberry".7 = STRING:     #3) With great power comes great responsibility.
NET-SNMP-EXTEND-MIB::nsExtendOutLine."raspberry".8 = STRING:
NET-SNMP-EXTEND-MIB::nsExtendOutLine."raspberry".9 = STRING: sudo: no tty present and no askpass program specified
NET-SNMP-EXTEND-MIB::nsExtendOutLine."raspberry".10 = STRING:
NET-SNMP-EXTEND-MIB::nsExtendOutLine."raspberry".11 = STRING: We trust you have received the usual lecture from the local System
NET-SNMP-EXTEND-MIB::nsExtendOutLine."raspberry".12 = STRING: Administrator. It usually boils down to these three things:
NET-SNMP-EXTEND-MIB::nsExtendOutLine."raspberry".13 = STRING:
NET-SNMP-EXTEND-MIB::nsExtendOutLine."raspberry".14 = STRING:     #1) Respect the privacy of others.
NET-SNMP-EXTEND-MIB::nsExtendOutLine."raspberry".15 = STRING:     #2) Think before you type.
NET-SNMP-EXTEND-MIB::nsExtendOutLine."raspberry".16 = STRING:     #3) With great power comes great responsibility.
NET-SNMP-EXTEND-MIB::nsExtendOutLine."raspberry".17 = STRING:
NET-SNMP-EXTEND-MIB::nsExtendOutLine."raspberry".18 = STRING: sudo: no tty present and no askpass program specified
NET-SNMP-EXTEND-MIB::nsExtendOutLine."raspberry".19 = STRING:

etc. … :wink:. I can run the raspberry.sh script just fine on raspbian itself. In sudoers I have the following,
snmp ALL=(ALL) NOPASSWD: /usr/bin/raspberry.sh, /usr/bin/vcgencmd*

Thoughts?

Thanks!

OK, to help others out - figured out the change Raspbian made … I added (to /etc/snmp/snmpd.conf)
extend mytest /usr/bin/whoami

And, it seems in Debian 9.1 / Rasbpian, they have changed the snmp userid it’s now Debian-snmp (can see that in snmpwalk, with the addition above and snmpd restart on the RPi) => change this in visudo, and all is good again.

1 Like

Thank you for the heads up arrmo, saved hours of pulling my hair out!

Ughhhhhhh! Thank you !

I thought my issue was going to be something like this. But you’ve confirmed what I was seeing on my Pi.

Have updated the docs: https://github.com/librenms/librenms/pull/8813