Enable systemd_timesyncd Service
An XCCDF Rule
Description
The systemd_timesyncd
service can be enabled with the following command:
$ sudo systemctl enable systemd_timesyncd.service
Rationale
Enabling the systemd_timesyncd
service ensures that this host
uses the ntp protocol to fetch time data from a ntp server.
Synchronizing time is essential for authentication
services such as Kerberos, but it is also important for maintaining accurate
logs and auditing possible security breaches.
Additional information on Ubuntu network time protocol is
available at
https://help.ubuntu.com/lts/serverguide/NTP.html.en.
- ID
- xccdf_org.ssgproject.content_rule_service_timesyncd_enabled
- Severity
- High
- References
- Updated
Remediation - OS Build Blueprint
[customizations.services]
enabled = ["systemd-timesyncd"]
Remediation - Ansible
- name: Gather the package facts
package_facts:
manager: auto
tags:
- CCE-91659-3
- NIST-800-53-AU-8(1)(a)
Remediation - Shell Script
# Remediation is applicable only in certain platforms
if [ ! -f /.dockerenv ] && [ ! -f /run/.containerenv ] && { ( ! ( rpm --quiet -q chrony ) && ! ( rpm --quiet -q ntp ) ); }; then
SYSTEMCTL_EXEC='/usr/bin/systemctl'
"$SYSTEMCTL_EXEC" unmask 'systemd-timesyncd.service'
"$SYSTEMCTL_EXEC" start 'systemd-timesyncd.service'
Remediation - Puppet
include enable_systemd-timesyncd
class enable_systemd-timesyncd {
service {'systemd-timesyncd':
enable => true,
ensure => 'running',