Skip to content

Enable the NTP Daemon

An XCCDF Rule

Description

The ntp service can be enabled with the following command:
$ sudo systemctl enable ntp.service

warning alert: Warning

The
ntp
package is not available in Red Hat Enterprise Linux 8. Please consider the
chrony
package instead together with the respective
service_chronyd_enabled
rule.

Rationale

Enabling the ntp service ensures that the ntp service will be running and that the system will synchronize its time to any servers specified. This is important whether the system is configured to be a client (and synchronize only its own clock) or it is also acting as an NTP server to other systems. Synchronizing time is essential for authentication services such as Kerberos, but it is also important for maintaining accurate logs and auditing possible security breaches.

The NTP daemon offers all of the functionality of ntpdate, which is now deprecated.

ID
xccdf_org.ssgproject.content_rule_service_ntp_enabled
Severity
High
References
Updated

Remediation Templates

A Puppet Snippet

include enable_ntp
class enable_ntp {
  service {'ntp':
    enable => true,
    ensure => 'running',
  }
}

An Ansible Snippet

- name: Gather the package facts
  package_facts:
    manager: auto
  tags:
  - NIST-800-53-AU-8(1)(a)
  - NIST-800-53-CM-6(a)

script:kickstart

service enable ntp

OS Build Blueprint

[customizations.services]
enabled = ["ntp"]

A Shell Script

# Remediation is applicable only in certain platforms
if rpm --quiet -q kernel && { rpm --quiet -q ntp; }; then
SYSTEMCTL_EXEC='/usr/bin/systemctl'
"$SYSTEMCTL_EXEC" unmask 'ntp.service'
"$SYSTEMCTL_EXEC" start 'ntp.service'
"$SYSTEMCTL_EXEC" enable 'ntp.service'