← All rules
SOCLE-CLD-PKG-120// Packagescriticalinventory state

Uninstall ypserv Package

Ensures the insecure NIS server package ypserv is not installed.

Checked against what is installed or registered, packages present/absent, account databases.

A pass proves✓ running now✓ on disk✓ survives rebootthe qualified verdict →
Debian 12CIS 1.1.0Debian 13CIS 1.0.0FedoraRHEL 8 / Rocky 8 / AlmaLinux 8CIS 4.0.0RHEL 9 / Rocky 9 / AlmaLinux 9CIS 2.0.0Ubuntu 22.04CIS 3.0.0Ubuntu 24.04CIS 1.0.0Ubuntu 26.04
One check, maps to 4 standards

A mapping is a cross-reference to where each standard places this requirement, anchored and cross-validated, not a claim of equivalence. A passing check is evidence toward these references, how to read it.

Why this rule matters

ypserv is the NIS (Network Information Service) server daemon. NIS provides an unencrypted authentication service that protects neither the confidentiality nor the integrity of user passwords or the remote session, and has a history of DoS and buffer-overflow vulnerabilities. Removing the ypserv package decreases the risk of accidental or intentional activation of NIS/NIS+ and removes a high-value attack surface; modern deployments should use LDAP instead.

What Pavois checks

Pavois queries the package database via the InSpec package('ypserv') resource (rpm -q / dpkg -s). Checking the package guarantees the NIS server cannot be started to serve unencrypted credential maps; if the package is gone, the ypserv service unit no longer exists.

describe package('ypserv') do
  it { should_not be_installed }
end

How to verify it is applied

On RHEL-family: rpm -q ypservpackage ypserv is not installed. On Debian/Ubuntu: dpkg -s ypservdpkg-query: package 'ypserv' is not installed. You can also confirm nothing serves NIS with ss -lunp | grep ypserv returning no rows.

Inspect & investigate

  • Package state: rpm -q ypserv / dpkg -s ypserv; removal in /var/log/dnf.rpm.log or /var/log/dpkg.log.
  • Past NIS server activity (before removal): journalctl -u ypserv.

Remediation

Pavois's harden plan declares a package resource for ypserv with action remove, so pavois harden apply uninstalls it (dnf remove ypserv / apt-get purge ypserv). Removing the package also removes the ypserv unit, so no restart is needed.

Pavois applies this with its own harden engine, the plan below, not a shell script:

actionremove
nameypserv
resourcepackage
pavois harden plan local

where the target is local, a user@host SSH alias, or a container , Docs

Impact & precautions

If ypserv stays installed, this host can serve an unencrypted NIS directory exposing password maps to the network. Before applying: confirm this machine is not an active NIS master/slave serving other hosts, check systemctl is-enabled ypserv and whether clients bind to it (ss -lunp | grep ypserv). If it is a live NIS server, migrate the NIS clients to LDAP/SSSD before removing it, otherwise those clients lose directory/authentication and may lock out. Removal does not affect this host's own SSH access.

Standards mapping

StandardReferenceTypeVersionConfidence
ANSSI BP-028R62direct2.0high
CIS2.1.10, 2.2.4directper OS, see the benchmark tablehigh
NISTCM-6(a), CM-7(a), CM-7(b), IA-5(1)(c)supporting800-53 Rev 5 · 800-171 Rev 2 (pinned)medium
PCI DSS2.2.4supporting4.0.1medium

Each reference is a cross-reference anchored in the upstream benchmark and cross-validated against the SCAP Security Guide and ansible-lockdown, not a claim of equivalence. Direct = a prescriptive, line-level requirement; supporting = an abstract control family (NIST) the check provides evidence toward. How to read a mapping.

Sources & references