PostgreSQL
TMA-POSTGRES-1.3
Ensure systemd Service Files Are Enabled
LowLevel 1Automatedpostgres
Description
Confirm, and correct if necessary, the PostgreSQL systemd service is enabled. Passes when at least one postgresql* systemd service unit is enabled.
How it is checked
Audit method: Shell command
shell
out=$(systemctl list-unit-files --type=service --no-legend 'postgresql*' 2>/dev/null) || exit 1; printf '%s\n' "$out" | awk '$2=="enabled"{e=1} END{print e?"enabled":"not-enabled"}'- Expected output
enabled
How it is fixed
Fix method: Guidance or infrastructure patch
Enable the PostgreSQL unit for the default target, e.g. systemctl enable postgresql-18 (PGDG) or systemctl enable postgresql (Debian/Ubuntu), then confirm with systemctl is-enabled.
Properties
- Operating systems
- Any
- Tags
- postgresdatabaseservice
- Reference
- CIS PostgreSQL 18 Benchmark v1.0.0 - 1.3 Ensure systemd Service Files Are Enabled
Check this host
Run this on a machine you are allowed to audit. The scan is read-only.
shell
tmaegis scan --target postgres