How To Install slapd on Ubuntu 20.04

In this tutorial we learn how to install slapd on Ubuntu 20.04. slapd is OpenLDAP server (slapd) OpenLDAP server (slapd) OpenLDAP server (slapd)

Introduction

In this tutorial we learn how to install slapd on Ubuntu 20.04.

What is slapd

slapd is:

This is the OpenLDAP (Lightweight Directory Access Protocol) server (slapd). The server can be used to provide a standalone directory service.

Package: slapd Architecture: amd64 Version: 2.4.49+dfsg-2ubuntu1.7 Priority: optional Section: net Source: openldap Origin: Ubuntu Maintainer: Ubuntu Developers [email protected] Original-Maintainer: Debian OpenLDAP Maintainers [email protected] Bugs: https://bugs.launchpad.net/ubuntu/+filebug Installed-Size: 15926 Provides: ldap-server, libslapi-2.4-2 Pre-Depends: debconf (>= 0.5) | debconf-2.0 Depends: libc6 (>= 2.28), libcrypt1 (>= 1:4.1.0), libdb5.3, libldap-2.4-2 (= 2.4.49+dfsg-2ubuntu1.7), libltdl7 (>= 2.4.6), libodbc1 (>= 2.3.1), libperl5.30 (>= 5.30.0), libsasl2-2 (>= 2.1.27+dfsg), libwrap0 (>= 7.6-4~), coreutils (>= 4.5.1-1), psmisc, perl:any (» 5.8.0) | libmime-base64-perl, adduser, lsb-base (>= 3.2-13) Recommends: libsasl2-modules Suggests: ldap-utils, ufw, libsasl2-modules-gssapi-mit | libsasl2-modules-gssapi-heimdal Conflicts: ldap-server, libltdl3 (= 1.5.4-1), umich-ldapd Replaces: ldap-utils (« 2.2.23-3), libldap2 Filename: pool/main/o/openldap/slapd_2.4.49+dfsg-2ubuntu1.7_amd64.deb Size: 1397224 MD5sum: 23fea75dba0ccec8d88fcbaa0e7a5e88 SHA1: ed6ee0717faea4b5c66c2cd23b0fbddf33d9f67c SHA256: bd81407229ceda0ea7d86ce4aae3e73305bc7e21624d596fc132df30862c3f39 SHA512: d32baabf6adce3efb37ed9f5b759d20b6798a571c22c4b1792966879642e145d80e949a99c33c1b33074ec7dc6cb15521f9824a81652d4c875997d989263a849 Homepage: http://www.openldap.org/ Description-en: OpenLDAP server (slapd) This is the OpenLDAP (Lightweight Directory Access Protocol) server (slapd). The server can be used to provide a standalone directory service.

Package: slapd Architecture: amd64 Version: 2.4.49+dfsg-2ubuntu1 Priority: optional Section: net Source: openldap Origin: Ubuntu Maintainer: Ubuntu Developers [email protected] Original-Maintainer: Debian OpenLDAP Maintainers [email protected] Bugs: https://bugs.launchpad.net/ubuntu/+filebug Installed-Size: 15925 Provides: ldap-server, libslapi-2.4-2 Pre-Depends: debconf (>= 0.5) | debconf-2.0 Depends: libc6 (>= 2.28), libcrypt1 (>= 1:4.1.0), libdb5.3, libldap-2.4-2 (= 2.4.49+dfsg-2ubuntu1), libltdl7 (>= 2.4.6), libodbc1 (>= 2.3.1), libperl5.30 (>= 5.30.0), libsasl2-2 (>= 2.1.27+dfsg), libwrap0 (>= 7.6-4~), coreutils (>= 4.5.1-1), psmisc, perl:any (» 5.8.0) | libmime-base64-perl, adduser, lsb-base (>= 3.2-13) Recommends: libsasl2-modules Suggests: ldap-utils, ufw, libsasl2-modules-gssapi-mit | libsasl2-modules-gssapi-heimdal Conflicts: ldap-server, libltdl3 (= 1.5.4-1), umich-ldapd Replaces: ldap-utils (« 2.2.23-3), libldap2 Filename: pool/main/o/openldap/slapd_2.4.49+dfsg-2ubuntu1_amd64.deb Size: 1397308 MD5sum: 60c98b9dbcda232e6173b81cd4d530f1 SHA1: 0f3915e0bf85de43ba77c3ce301def2771863f09 SHA256: 4a187c67015e7a0943351c77e63d2d0dd8d175f4f32f9ae011878c0ff432b110 Homepage: http://www.openldap.org/ Description-en: OpenLDAP server (slapd) This is the OpenLDAP (Lightweight Directory Access Protocol) server (slapd). The server can be used to provide a standalone directory service.

There are three methods to install slapd on Ubuntu 20.04. We can use apt-get, apt and aptitude. In the following sections we will describe each method. You can choose one of them.

Install slapd Using apt-get

Update apt database with apt-get using the following command.

sudo apt-get update

After updating apt database, We can install slapd using apt-get by running the following command:

sudo apt-get -y install slapd

Install slapd Using apt

Update apt database with apt using the following command.

sudo apt update

After updating apt database, We can install slapd using apt by running the following command:

sudo apt -y install slapd

Install slapd Using aptitude

If you want to follow this method, you might need to install aptitude first since aptitude is usually not installed by default on Ubuntu. Update apt database with aptitude using the following command.

sudo aptitude update

After updating apt database, We can install slapd using aptitude by running the following command:

sudo aptitude -y install slapd

How To Uninstall slapd on Ubuntu 20.04

To uninstall only the slapd package we can use the following command:

sudo apt-get remove slapd

Uninstall slapd And Its Dependencies

To uninstall slapd and its dependencies that are no longer needed by Ubuntu 20.04, we can use the command below:

sudo apt-get -y autoremove slapd

Remove slapd Configurations and Data

To remove slapd configuration and data from Ubuntu 20.04 we can use the following command:

sudo apt-get -y purge slapd

Remove slapd configuration, data, and all of its dependencies

We can use the following command to remove slapd configurations, data and all of its dependencies, we can use the following command:

sudo apt-get -y autoremove --purge slapd

References

Summary

In this tutorial we learn how to install slapd package on Ubuntu 20.04 using different package management tools: apt, apt-get and aptitude.