Debian GNU/Linux · Services

Disable LDAP and NIS directory server services the system does not provide

When it fails: An LDAP or NIS directory server can run on a system that does not provide one. A forgotten directory server can leak account data or let an attacker publish accounts.

CB-DEB-SVC-004mediumactiveautomatedautomated fixprofile core

As released in v0.1.1 beta · pre-release. Current state.

Description

Directory servers packaged by Debian:

  • OpenLDAP: slapd;
  • NIS: ypserv, with its companions yppasswdd (password changes) and ypxfrd (map transfers).

The control passes when each unit is masked or not installed at all.

A unit that does not exist counts as compliant. On Debian 12, slapd only ships a System V init script; systemd still masks the generated slapd.service.

Rationale

A directory server holds account and group data that other systems trust. NIS sends password hashes to any client that asks and has no real authentication; an unattended OpenLDAP server can expose or accept changes to that data.

Impact

Masking a unit stops it and prevents it from starting again. LDAP and NIS clients are not affected. Directory servers must exclude this control in their tailoring file.

Audit

For each unit, run systemctl is-enabled <unit>. It must print masked, or fail because the unit does not exist: slapd.service, ypserv.service, yppasswdd.service, ypxfrd.service.

Automated: every check must pass. Scanners report each check by its id.

slapd

OpenLDAP server.

unit: slapd.service
state: masked

ypserv

NIS server.

unit: ypserv.service
state: masked

yppasswdd

NIS password update server.

unit: yppasswdd.service
state: masked

ypxfrd

NIS map transfer server.

unit: ypxfrd.service
state: masked

Remediation

Stop and mask each unit that is installed: systemctl mask --now <unit>. If the package is not needed at all, remove it instead: apt purge slapd ypserv.

Restartnone
Disruptionlow

Rollback

Run systemctl unmask <unit> then systemctl enable --now <unit>.

slapd

Generated from check slapd: the engine writes the fix for every output, it sets the expected value and the check runs again after.

ypserv

Generated from check ypserv: the engine writes the fix for every output, it sets the expected value and the check runs again after.

yppasswdd

Generated from check yppasswdd: the engine writes the fix for every output, it sets the expected value and the check runs again after.

ypxfrd

Generated from check ypxfrd: the engine writes the fix for every output, it sets the expected value and the check runs again after.

Each release turns these fixes into remediate.sh and an Ansible role per profile: dry run by default, a fix runs only when its check fails.

References

Mappings

FrameworkIDRelationNote
ANSSI-BP-028 - Recommandations de configuration d'un système GNU/Linux2.0R62partialR62 asks to disable every unneeded service and names NIS; this control covers directory servers.
NIST SP 800-53 Rev. 55.1.1CM-7partial

How this control relates to the other framework's: equivalent, stricter, looser, partial or related.

Threats mitigated

People and lifecycle

Authors
Verified2026-10-18 by Sn0wAlice on 12, Proxmox VM, Debian 12 genericcloud image, kernel 6.1.0-54-cloud-amd64. Fresh image passes; with slapd and ypserv installed the checks fail (ypserv disabled still fails), fix masks, audit passes after reboot; packages still purge cleanly.
Verified2026-10-18 by Sn0wAlice on 13, Proxmox VM, Debian 13 genericcloud image, kernel 6.12.113+deb13-cloud-amd64. Fresh image passes; with slapd and ypserv installed the checks fail (ypserv disabled still fails), fix masks, audit passes after reboot; packages still purge cleanly.
Introduced inv0.1.0
Created, updated2026-10-18, 2026-10-18
Translationsfr