Description
Directory servers packaged by Ubuntu:
- OpenLDAP:
slapd; - NIS:
ypserv, with its companionsyppasswdd(password changes) andypxfrd(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 Ubuntu, 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.
| Restart | none |
| Disruption | low |
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
- slapd(8), Ubuntu manual pages Canonical, vendor-doc, accessed 2026-10-19
- ypserv(8), Ubuntu manual pages Canonical, vendor-doc, accessed 2026-10-19
- systemctl(1), Ubuntu manual pages Canonical, vendor-doc, accessed 2026-10-19
- ANSSI-BP-028 v2.0 - Recommandations de configuration d'un système GNU/Linux (R62) ANSSI, guide, accessed 2026-10-19
Mappings
| Framework | ID | Relation | Note |
|---|---|---|---|
| ANSSI-BP-028 - Recommandations de configuration d'un système GNU/Linux2.0 | R62 | partial | R62 asks to disable every unneeded service and names NIS; this control covers directory servers. |
| NIST SP 800-53 Rev. 55.1.1 | CM-7 | partial |
How this control relates to the other framework's: equivalent, stricter, looser, partial or related.
Threats mitigated
| Taxonomy | ID |
|---|---|
| MITRE ATT&CK | T1210 |
| MITRE ATT&CK | T1087.002 |
People and lifecycle
| Authors |
|
| Verified | 2026-10-19 by Sn0wAlice on 20.04, Proxmox VM, Ubuntu 20.04 cloud image, kernel 5.4.0-216-generic. Stock image passes; with slapd and nis installed (SysV units, generated) the checks fail, fix masks them, audit passes, unchanged on a second run and after reboot. |
| Verified | 2026-10-19 by Sn0wAlice on 22.04, Proxmox VM, Ubuntu 22.04 cloud image, kernel 5.15.0-198-generic. Stock image passes (units absent); with slapd and nis installed the check fails, server-hardened remediation masks the units, audit passes, unchanged on a second run and after reboot. |
| Verified | 2026-10-19 by Sn0wAlice on 24.04, Proxmox VM, Ubuntu 24.04 cloud image, kernel 6.8.0-147-generic. Stock image passes (units absent); with slapd and nis installed the check fails, server-hardened remediation masks the units, audit passes, unchanged on a second run and after reboot. |
| Verified | 2026-10-19 by Sn0wAlice on 26.04, Proxmox VM, Ubuntu 26.04 cloud image, kernel 7.0.0-38-generic. Stock image passes (units absent); with slapd and nis installed the check fails, server-hardened remediation masks the units, audit passes, unchanged on a second run and after reboot. |
| Introduced in | v0.1.0 |
| Created, updated | 2026-10-19, 2026-10-19 |
| Translations | fr |