Created on 10-17-2016 06:34 AM Edited on 05-26-2022 07:20 AM By Anonymous
Description
Summary of Article
This article will provide steps to allow you to configure snmp v3 for Linux. As long as you are on the latest version of net-snmp, this will work for you.
NOTE: some linux administrative experience will help you here - Depending on the version of SNMP and version of linux, your location for snmpd.conf may exist in the following for [ /var/lib/snmp/snmpd.conf ]: /var/snmp/ ; /var/lib/snmp/ ; /var/lib/net-snmp/ ; or /var/net-snmp/
Steps rwcommunity/rocommunity or com2sec
- service snmpd stop
- vi /etc/snmp/snmpd.conf
- Before editing /etc/snmp/snmpd.conf, make a backup of this configuration file
- This is VERY important as this file is vital to have so your snmp daemon has credentials to utilize
- Add the following to the end of the file: rouser <snmpv3user>
- Fill in the name with your username
- Do not leave the "< >" tags
- Save the file
- vi /var/lib/snmp/snmpd.conf
- Before editing /var/lib/snmp/snmpd.conf, make a backup of this configuration file
- This is VERY important as this file is vital to make snmp daemon run properly
- Go to the end of this file, add the following line:
- createUser <snmpv3user> MD5 <snmpv3md5password> DES <snmpv3despassword>
- Make absolutely sure that nothing else is edited here
- Make sure that the snmpv3user is replaced with the same user in step 3
- Do not leave the "< >" tags
- If you want to utilize SHA or AES, make the appropriate changes above
- Save the file
- service snmpd start
- cat /var/lib/snmp/snmpd.conf
- If this works, restarting snmpd will have no errors, also the entry that you created under /var/lib/snmp/snmpd.conf will be removed
- snmpwalk -v 3 -u <snmpv3user> -l authpriv <IP> -a MD5 -A <snmpv3md5password> -x DES -X <snmpv3despassword> .
- You will see your snmpwalk if this works, if there are any errors after this please reference net-snmp for further instructions
Additional Information
An easier method would be to install net-snmp-devel on your linux machine
Follow these steps if you have already installed net-snmp-devel on your linux server/client
- service snmpd stop
- net-snmp-config --create-snmpv3-user -ro -A <MD5passwordhere> -X <DESpasswordhere> -x DES -a MD5 <SNMPUSERNAME>
- service snmpd start
- Test by following step 10 from above.