Uninstall openldap-servers Package
An XCCDF Rule
Description
The slapd package is not installed by default on a Ubuntu 20.04 system. It is needed only by the OpenLDAP server, not by the clients which use LDAP for authentication. If the system is not intended for use as an LDAP Server it should be removed.
Rationale
Unnecessary packages should not be installed to decrease the attack surface of the system. While this software is clearly essential on an LDAP server, it is not necessary on typical desktop or workstation systems.
- ID
- xccdf_org.ssgproject.content_rule_package_openldap-servers_removed
- Severity
- Low
- References
- Updated
Remediation - Shell Script
# CAUTION: This remediation script will remove slapd
# from the system, and may remove any packages
# that depend on slapd. Execute this
# remediation AFTER testing on a non-production
# system!
Remediation - Ansible
- name: Ensure slapd is removed
package:
name: slapd
state: absent
tags:
- NIST-800-53-CM-6(a)
Remediation - Puppet
include remove_slapd
class remove_slapd {
package { 'slapd':
ensure => 'purged',
}