Skip to content

Enable the Hardware RNG Entropy Gatherer Service

An XCCDF Rule

Description

The Hardware RNG Entropy Gatherer service should be enabled. The rngd service can be enabled with the following command:

$ sudo systemctl enable rngd.service

warning alert: Warning

For Red Hat Enterprise Linux 9 running with kernel FIPS mode enabled this rule is not applicable. The in-kernel deterministic random bit generator (DRBG) is used in FIPS mode instead. Consequently, the rngd service can't be started in FIPS mode.

Rationale

The rngd service feeds random data from hardware device to kernel random device.

ID
xccdf_org.ssgproject.content_rule_service_rngd_enabled
Severity
Low
References
Updated



Remediation - Shell Script

# Remediation is applicable only in certain platforms
if rpm --quiet -q kernel && { ! ( [ "$(sysctl -a | grep -c 'fips_enabled.*1')" -eq 1 ] ); }; then

SYSTEMCTL_EXEC='/usr/bin/systemctl'
"$SYSTEMCTL_EXEC" unmask 'rngd.service'
"$SYSTEMCTL_EXEC" start 'rngd.service'

Remediation - Puppet

include enable_rngd

class enable_rngd {
  service {'rngd':
    enable => true,
    ensure => 'running',

Remediation - Ansible

- name: Gather the package facts
  package_facts:
    manager: auto
  tags:
  - CCE-84223-7
  - enable_strategy

Remediation - script:kickstart


service enable rngd

Remediation - OS Build Blueprint


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