TMAegis
Más reglas para postgres

TMA-POSTGRES-1.3

Ensure systemd Service Files Are Enabled

BajaNivel 1Automatizadapostgres

Descripción

Confirm, and correct if necessary, the PostgreSQL systemd service is enabled. Passes when at least one postgresql* systemd service unit is enabled.

Cómo se verifica

Método de auditoría: Comando de shell

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"}'
Salida esperada
enabled

Cómo se corrige

Método de corrección: Guía o parche de infraestructura

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.

Propiedades

Sistemas operativos
Cualquiera
Etiquetas
postgresdatabaseservice
Referencia
CIS PostgreSQL 18 Benchmark v1.0.0 - 1.3 Ensure systemd Service Files Are Enabled

Verificar este host

Ejecute esto en un equipo que tenga permiso para auditar. El escaneo es de solo lectura.

shell
tmaegis scan --target postgres