Skip to content

Ensure Default SNMP Password Is Not Used

An XCCDF Rule

Description

Edit /etc/snmp/snmpd.conf, remove or change the default community strings of public and private. This profile configures new read-only community string to and read-write community string to . Once the default community strings have been changed, restart the SNMP service:

$ sudo service snmpd restart

Rationale

Whether active or not, default simple network management protocol (SNMP) community strings must be changed to maintain security. If the service is running with the default authenticators, then anyone can gather data about the system and the network and use the information to potentially compromise the integrity of the system and network(s).

ID
xccdf_org.ssgproject.content_rule_snmpd_not_default_password
Severity
High
References
Updated



Remediation - Ansible

- name: Gather the package facts
  package_facts:
    manager: auto
  tags:
  - CCE-27386-2
  - DISA-STIG-RHEL-07-040800

Remediation - Shell Script

# Remediation is applicable only in certain platforms
if rpm --quiet -q net-snmp; then

var_snmpd_ro_string='<xccdf-1.2:sub xmlns:xccdf-1.2="http://checklists.nist.gov/xccdf/1.2" idref="xccdf_org.ssgproject.content_value_var_snmpd_ro_string" use="legacy"/>'
var_snmpd_rw_string='<xccdf-1.2:sub xmlns:xccdf-1.2="http://checklists.nist.gov/xccdf/1.2" idref="xccdf_org.ssgproject.content_value_var_snmpd_rw_string" use="legacy"/>'