Skip to content

Install the systemd_timesyncd Service

An XCCDF Rule

Description

The systemd_timesyncd service should be installed.

Rationale

Time synchronization (using NTP) is required by almost all network and administrative tasks (syslog, cryptographic based services (authentication, etc.), etc.). systemd_timesyncd is a part of the systemd suite and acts as a NTP client.

ID
xccdf_org.ssgproject.content_rule_package_timesyncd_installed
Severity
High
References
Updated



Remediation - OS Build Blueprint


[[packages]]
name = "systemd-timesyncd"
version = "*"

Remediation - Ansible

- name: Ensure systemd-timesyncd is installed
  package:
    name: systemd-timesyncd
    state: present
  when: ansible_virtualization_type not in ["docker", "lxc", "openvz", "podman", "container"]
  tags:

Remediation - Puppet

include install_systemd-timesyncd

class install_systemd-timesyncd {
  package { 'systemd-timesyncd':
    ensure => 'installed',
  }

Remediation - Shell Script

# Remediation is applicable only in certain platforms
if [ ! -f /.dockerenv ] && [ ! -f /run/.containerenv ]; then

DEBIAN_FRONTEND=noninteractive apt-get install -y "systemd-timesyncd"

else