1. Home
  2. Security Hardening
  3. CIS PostgreSQL 10 OS V1.0.0
  4. Ensure systemd Service Files Are Enabled

Ensure systemd Service Files Are Enabled

Details

Confirm, and correct if necessary, the PostgreSQL systemd service is enabled.

Rationale:

Enabling the systemd service on the OS ensures the database service is active when a change of state occurs as in the case of a system startup or reboot.

Solution

Irrespective of package source, PostgreSQL services can be identified because it typically includes the text string ‘postgresql’. PGDG installs do not automatically register the service as a ‘want’ of the default systemd target. Multiple instances of PostgreSQL services often distinguish themselves using a version number.
$ whoami
root
$ systemctl enable postgresql-10
Created symlink from /etc/systemd/system/multi-user.target.wants/postgresql-10.service to /usr/lib/systemd/system/postgresql-10.service.
$ systemctl list-dependencies multi-user.target | grep -i postgres
* postgresql-10.service

Supportive Information

The following resource is also helpful.

This security hardening control applies to the following category of controls within NIST 800-53: Configuration Management.This control applies to the following type of system Unix.

References

Source

Updated on July 16, 2022
Was this article helpful?

Related Articles