From f272db58fc66ae338851be7110fcdfb0cfc771e6 Mon Sep 17 00:00:00 2001 From: Matthew Burket Date: Tue, 17 Sep 2024 15:53:48 -0500 Subject: [PATCH 1/4] Update snmpd_not_default_password to use systemctl --- .../snmp_configure_server/snmpd_not_default_password/rule.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linux_os/guide/services/snmp/snmp_configure_server/snmpd_not_default_password/rule.yml b/linux_os/guide/services/snmp/snmp_configure_server/snmpd_not_default_password/rule.yml index a2efa305c3c..493e71de149 100644 --- a/linux_os/guide/services/snmp/snmp_configure_server/snmpd_not_default_password/rule.yml +++ b/linux_os/guide/services/snmp/snmp_configure_server/snmpd_not_default_password/rule.yml @@ -8,7 +8,7 @@ description: |- public and private. This profile configures new read-only community string to {{{ xccdf_value("var_snmpd_ro_string") }}} and read-write community string to {{{ sub_var_value("var_snmpd_rw_string") }}}. Once the default community strings have been changed, restart the SNMP service: -
$ sudo service snmpd restart
+
$ sudo systemctl restart snmpd
rationale: |- Whether active or not, default simple network management protocol (SNMP) community From 10193cdf94b664a14fc862d7f6be3849acb088f1 Mon Sep 17 00:00:00 2001 From: Matthew Burket Date: Tue, 17 Sep 2024 16:00:00 -0500 Subject: [PATCH 2/4] Move snmpd_use_newer_protocol to use systemctl for restart --- .../snmp_configure_server/snmpd_use_newer_protocol/rule.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linux_os/guide/services/snmp/snmp_configure_server/snmpd_use_newer_protocol/rule.yml b/linux_os/guide/services/snmp/snmp_configure_server/snmpd_use_newer_protocol/rule.yml index d1dda8a28a4..77beca76366 100644 --- a/linux_os/guide/services/snmp/snmp_configure_server/snmpd_use_newer_protocol/rule.yml +++ b/linux_os/guide/services/snmp/snmp_configure_server/snmpd_use_newer_protocol/rule.yml @@ -6,7 +6,7 @@ title: 'Configure SNMP Service to Use Only SNMPv3 or Newer' description: |- Edit /etc/snmp/snmpd.conf, removing any references to rocommunity, rwcommunity, or com2sec. Upon doing that, restart the SNMP service: -
$ sudo service snmpd restart
+
$ sudo systemctl restart snmpd
rationale: |- Earlier versions of SNMP are considered insecure, as they potentially allow From d736127f76f98819ad80c7a79331bf0d5f069e95 Mon Sep 17 00:00:00 2001 From: Matthew Burket Date: Tue, 17 Sep 2024 16:01:42 -0500 Subject: [PATCH 3/4] dnf erase -> dnf remove To align to the newer way of doing things. --- shared/macros/01-general.jinja | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/shared/macros/01-general.jinja b/shared/macros/01-general.jinja index 634474ce795..4089d4d8707 100644 --- a/shared/macros/01-general.jinja +++ b/shared/macros/01-general.jinja @@ -660,14 +660,14 @@ JINJA MACRO ERROR - Unknown init system '{{{ init_system }}}'. Example output:: - $ sudo dnf erase remove package + $ sudo dnf remove package :param package: Package to remove :type package: str #}} {{%- macro dnf_package_remove(package) %}} - $ sudo dnf erase {{{ package }}} + $ sudo dnf remove {{{ package }}} {{%- endmacro %}} From cbfde5b1af5636bd841ba14b3eea70cfeb968798 Mon Sep 17 00:00:00 2001 From: Matthew Burket Date: Tue, 17 Sep 2024 16:02:15 -0500 Subject: [PATCH 4/4] Move snmpd_no_rwusers to use systemctl for restart --- .../snmp/snmp_configure_server/snmpd_no_rwusers/rule.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linux_os/guide/services/snmp/snmp_configure_server/snmpd_no_rwusers/rule.yml b/linux_os/guide/services/snmp/snmp_configure_server/snmpd_no_rwusers/rule.yml index a7b8a41fa81..ab487ee5c83 100644 --- a/linux_os/guide/services/snmp/snmp_configure_server/snmpd_no_rwusers/rule.yml +++ b/linux_os/guide/services/snmp/snmp_configure_server/snmpd_no_rwusers/rule.yml @@ -6,7 +6,7 @@ title: 'Ensure SNMP Read Write is disabled' description: |- Edit /etc/snmp/snmpd.conf, remove any rwuser entries. Once the read write users have been removed, restart the SNMP service: -
$ sudo service snmpd restart
+
$ sudo systemctl restart snmpd
rationale: |- Certain SNMP settings can permit users to execute system behaviors from user