System information
will clone the opennmsUser user from the initial user. We configured the password
setup_passphrase for the authentication and privacy settings when we added the ini-
tial user to the /var/net-snmp/snmpd.conf file:
$ sudo snmpusm -v3 -u initial -n "" -l authPriv \
-a MD5 -A setup_passphrase \
-x DES -X setup_passphrase \
localhost create opennmsUser initial
User successfully created.
Now change the passphrase for the opennmsUser with the following command:
$ sudo snmpusm -v 3 -u initial -n "" -l authPriv \
-a MD5 -A setup_passphrase \
-x DES -X setup_passphrase \
-Ca -Cx localhost passwd setup_passphrase \
0p3nNMSv3 opennmsUser
SNMPv3 Key(s) successfully changed.
The password we’ve assigned to the opennmsUser, 0p3nNMSv3, is intended
solely as an example, and should definitely not be used. Change it to
something else that is secure.
You can now test to make sure you’re getting results from your user by utilizing the
snmpwalk application:
$ sudo snmpwalk -v 3 -u opennmsUser -n "" -l authPriv \
-a MD5 -A 0p3nNMSv3 \
-x DES -X 0p3nNMSv3 \
localhost ifTable
IF-MIB::ifIndex.1 = INTEGER: 1
IF-MIB::ifIndex.2 = INTEGER: 2
IF-MIB::ifIndex.3 = INTEGER: 3
IF-MIB::ifDescr.1 = STRING: lo
IF-MIB::ifDescr.2 = STRING: eth0
IF-MIB::ifDescr.3 = STRING: sit0
Now that you have data being returned, lock down the /etc/snmp/snmpd.conf file to
make sure only the opennmsUser can read data from the SNMP daemon.
The file will look quite similar to the one in the previous section, for configuring
SNMPv2c. We’ve commented out the lines you no longer need with the hash symbol
(#) and added new group and access lines to control access to the SNMP daemon:
556 | Chapter 24: System Monitoring and Logging