Skip to content

Ensure rsyncd service is disabled

An XCCDF Rule

Description

The rsyncd service can be disabled with the following command:
$ sudo systemctl mask --now rsyncd.service

Rationale

The rsyncd service presents a security risk as it uses unencrypted protocols for communication.

ID
xccdf_org.ssgproject.content_rule_service_rsyncd_disabled
Severity
Medium
References
Updated

Remediation Templates

OS Build Blueprint

[customizations.services]
masked = ["rsyncd"]

A Kubernetes Patch

apiVersion: machineconfiguration.openshift.io/v1
kind: MachineConfig
spec:
  config:
    ignition:
      version: 3.1.0

A Shell Script

# Remediation is applicable only in certain platforms
if rpm --quiet -q kernel; then
SYSTEMCTL_EXEC='/usr/bin/systemctl'
"$SYSTEMCTL_EXEC" stop 'rsyncd.service'
"$SYSTEMCTL_EXEC" disable 'rsyncd.service'
"$SYSTEMCTL_EXEC" mask 'rsyncd.service'

A Puppet Snippet

include disable_rsyncd
class disable_rsyncd {
  service {'rsyncd':
    enable => false,
    ensure => 'stopped',
  }
}

script:kickstart

service disable rsyncd

An Ansible Snippet

- name: Gather the package facts
  package_facts:
    manager: auto
  tags:
  - PCI-DSSv4-2.2
  - PCI-DSSv4-2.2.4