CentOS / RHEL : How to change SNMP community string

Question: How to change an SNMP community string in CentOS / RHEL?

Answer:

Here is a short note on how to change an SNMP community string and test if its working allright.
1. The below line in /etc/snmp/snmpd.conf needs to be modified to change the community string. Replace the string public or the last word of the line with your new community string. Please note, the community string named “public” is just an example here. It can be any name in your environment.

com2sec notConfigUser  default       public

2. Restart snmpd.

# service snmpd restart

Test using snmpwalk

You can verify the change of community string with the command snmpwalk.

# snmpwalk -v1 -c [community string] localhost system
Related Post