From 8d097ebfeb79bdd9d08d3115ef84352d237bfe3c Mon Sep 17 00:00:00 2001 From: Charles N Wyble Date: Sat, 14 Jun 2025 07:45:23 -0500 Subject: [PATCH] librenms fixes --- newSrv.sh | 2 ++ snmp-sudo.conf | 1 + snmpd.conf | 6 +++--- 3 files changed, 6 insertions(+), 3 deletions(-) create mode 100644 snmp-sudo.conf diff --git a/newSrv.sh b/newSrv.sh index c62a677..f2186a3 100644 --- a/newSrv.sh +++ b/newSrv.sh @@ -173,6 +173,7 @@ git \ rsync \ tshark \ tcpdump \ +sudo \ lynis \ qemu-guest-agent \ zsh \ @@ -200,6 +201,7 @@ function global-postPackageConfiguration() echo "Now running $FUNCNAME...." ###Post package deployment bits +curl --silent https://dl.knownelement.com/FetchApplyDistPoint/snmp-sudo.conf > /etc/sudoers.d/snmpd.conf systemctl stop snmpd && /etc/init.d/snmpd stop sed -i "s|-Lsd|-LS6d|" /lib/systemd/system/snmpd.service curl --silent https://dl.knownelement.com/FetchApplyDistPoint/snmpd.conf > /etc/snmp/snmpd.conf && systemctl stop netdata && systemctl start netdata diff --git a/snmp-sudo.conf b/snmp-sudo.conf new file mode 100644 index 0000000..3ce5fd3 --- /dev/null +++ b/snmp-sudo.conf @@ -0,0 +1 @@ +Debian-snmp ALL = NOPASSWD: /bin/cat diff --git a/snmpd.conf b/snmpd.conf index 5662ebb..54bd2cb 100644 --- a/snmpd.conf +++ b/snmpd.conf @@ -31,9 +31,9 @@ extend osupdate /usr/local/librenms/os-updates.sh #Hardware Detection # (uncomment for x86 platforms) -extend manufacturer '/bin/cat /sys/devices/virtual/dmi/id/sys_vendor' -extend hardware '/bin/cat /sys/devices/virtual/dmi/id/product_name' -extend serial '/bin/cat /sys/devices/virtual/dmi/id/product_serial' +extend manufacturer '/usr/bin/sudo /bin/cat /sys/devices/virtual/dmi/id/sys_vendor' +extend hardware '/usr/bin/sudo /bin/cat /sys/devices/virtual/dmi/id/product_name' +extend serial '/usr/bin/sudo /bin/cat /sys/devices/virtual/dmi/id/product_serial' # Allow Systems Management Data Engine SNMP to connect to snmpd using SMUX