I am trying to enable SNMP version 3 with a single ready-only user on Mac OS X 10.8.5 so that I can remotely monitor the health of the computer. When I attempt a local
snmpwalk
, this message is returned:
No log handling enabled - using stderr logging
snmpwalk: Authentication failure (incorrect password, community or key)
Below are the exact steps I executed to get to this point. What am I missing? FYI, the username I am using is rouser with password 12345678
sudo snmpconf -i
creates /usr/share/snmp/snmpd.conf
with permissions -rw-r--r-- 1 root staff 484 Sep 25 14:44 snmpd.conf
and contains:
# snmpd.conf
# - created by the snmpconf configuration program
#
# SECTION: Access Control Setup
#
# This section defines who is allowed to talk to your running
# snmp agent.
# rouser: a SNMPv3 read-only user
# arguments: user [noauth|auth|priv] [restriction_oid]
rouser rouser priv
create user:
sudo net-snmp-config --create-snmpv3-user -ro -a 12345678 -x 12345678 -X AES -A SHA rouser
that creates /var/db/net-snmp/snmpd.conf
with permissions -rw-r--r-- 1 root wheel 46 Sep 25 14:44 snmpd.conf
and contains:
createUser rouser SHA "12345678" AES 12345678
that command also updates /usr/share/snmp/snmpd.conf
to this (last line added):
# snmpd.conf
# - created by the snmpconf configuration program
#
# SECTION: Access Control Setup
#
# This section defines who is allowed to talk to your running
# snmp agent.
# rouser: a SNMPv3 read-only user
# arguments: user [noauth|auth|priv] [restriction_oid]
rouser rouser priv
rouser rouser
enable SNMP:
sudo launchctl load -w /System/Library/LaunchDaemons/org.net-snmp.snmpd.plist
that command changed the permissions of /var/db/net-snmp/snmpd.conf
to -rw------- 1 root wheel 1420 Sep 25 15:04 snmpd.conf
and changed its contents to:
#
# 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?)
#
usmUser 1 3 0x80001f888098ad4f304567245400000000 "rouser" "rouser" NULL .1.3.6.1.6.3.10.1.1.3 0x22051a77e41dc526caebc92dc387257482bcd$
setserialno 1673336648
##############################################################
#
# snmpNotifyFilterTable persistent data
#
##############################################################
##############################################################
#
# ifXTable persistent data
#
ifXTable .1 14:0 18:0x $
ifXTable .2 14:0 18:0x $
ifXTable .3 14:0 18:0x $
ifXTable .4 14:0 18:0x $
ifXTable .5 14:0 18:0x $
ifXTable .6 14:0 18:0x $
ifXTable .7 14:0 18:0x $
ifXTable .8 14:0 18:0x $
##############################################################
engineBoots 1
oldEngineID 0x80001f888098ad4f304567245400000000
try querying the system locally:
snmpwalk -v 3 -u rouser -l authPriv -a MD5 -A 12345678 -x DES -X 12345678 localhost .1
that returns:
No log handling enabled - using stderr logging
snmpwalk: Authentication failure (incorrect password, community or key)
/var/log/snmpd.log:
/etc/snmp/snmpd.conf: line 61: Error: example config COMMUNITY not properly configured
/etc/snmp/snmpd.conf: line 62: Error: example config NETWORK not properly configured
net-snmp: 2 error(s) in config file(s)
NET-SNMP version 5.6
Authentication failed for rouser
Authentication failed for rouser
disable SNMP in the meantime
sudo launchctl unload -w /System/Library/LaunchDaemons/org.net-snmp.snmpd.plist
Any thoughts? Thanks!
Asked by fire_water
(205 rep)
Sep 25, 2014, 09:42 PM
Last activity: Feb 27, 2016, 03:18 AM
Last activity: Feb 27, 2016, 03:18 AM