Setting up and using SNMPv3 on OS X
SNMPv3 setup
The first thing we have to do to use SNMPv3 is to set it up. Now, if you’re really good with snmpd.conf syntax... well, you don't need this article. However, rather than hand-editing the conf file, we’re going to take advantage of a handy utility called snmpconf. (Warning for the Terminal-phobic: SNMP requires a lot of command-line work. There’s no way to really avoid it. If you’re an administrator who still fears Terminal and the command line, you’re going to need to move past that.) snmpconf is a Perl script designed to make setting up snmp easier—something which it’s pretty good at.
One nice thing, is that if you use snmpconf with the -i switch, (snmpconf -i), it will even put the various configuration files you create and modify in their correct locations for you. Handy, no? Of course, since you’re modifying system-level configurations, you have to run snmpconf via sudo to have the -i switch work correctly, so you have:
sudo /usr/bin/snmpconf -i
When you run this, if there are any existing configuration files, (and there most likely will be), you’ll be asked if you want snmpconf to read in the data from one, some, or none of those files. I prefer to start clean, so I usually pick none. (If you already have a functional SNMP setup and are adding SNMPv3 to it, pick the more appropriate option for your setup.) Enter none and hit return. Next, you’re going to be asked what files you want to modify: snmpd.conf, snmptrapd.conf, or snmp.conf. Since we want to set up how the system responds to SNMPv3 requests from other systems, we want to modify the configuration of the SNMP daemon, snmpd. Therefore, we're going to select option 1—snmpd.conf:

The next screen will give you all the options available for snmpd. Since we’re trying to keep this at least somewhat small, and the other information is available elsewhere, we’re going to ignore all the options that don’t involve setting up SNMPv3. So, we’re going to choose option 1, Access Control Setup, because that’s where we start configuring our SNMPv3 users:

With all that in mind, let’s set up our read-write user, option 1:




finished, hit return, and you move back to the snmpd config main screen:

finished again, and you’re back to the snmpconf main screen:

quit here, snmpconf will write your selections to the snmpd.conf file, and move it to the correct locations. If you want to change anything before that happens, this is your last chance to do so without repeating every step. If you're happy, then enter quit and hit return. snmpconf will tell you what happened, and where it put the files.







Add Your Comment