TMAegis
Plus de règles pour postgres

TMA-POSTGRES-1.3

Ensure systemd Service Files Are Enabled

FaibleNiveau 1Automatiséepostgres

Description

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

Méthode de vérification

Méthode d'audit: Commande 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"}'
Sortie attendue
enabled

Méthode de correction

Méthode de correction: Recommandation ou correctif d'infrastructure

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.

Propriétés

Systèmes d'exploitation
Tous
Étiquettes
postgresdatabaseservice
Référence
CIS PostgreSQL 18 Benchmark v1.0.0 - 1.3 Ensure systemd Service Files Are Enabled

Vérifier cet hôte

Exécutez cette commande sur une machine que vous êtes autorisé à auditer. L'analyse est en lecture seule.

shell
tmaegis scan --target postgres