How to Install OpenLDAP and phpLDAPadmin on Ubuntu 16.04

  1. Support for Simple Authentication and Security Layer and Transport Layer Security.
  2. Supports the next generation Internet Protocol IPv6.
  3. Schema Discovery.
  4. Extensibility (controls, extended operations, and more).
  5. Internationalization through the use of Unicode

Prerequisites

  1. A fresh Alibaba Cloud Ubuntu 16.04 instance.
  2. A static IP address is configured.
  3. A root password is set up to your instance.

Launch ECS Instance

apt-get update -y

Install OpenLDAP

apt-get install slapd ldap-utils -y
systemctl status slapd
slapd.service - LSB: OpenLDAP standalone server (Lightweight Directory Access Protocol)
Loaded: loaded (/etc/init.d/slapd; bad; vendor preset: enabled)
Active: active (running) since Fri 2018-08-31 20:26:05 IST; 2min 5s ago
Docs: man:systemd-sysv-generator(8)
CGroup: /system.slice/slapd.service
└─16622 /usr/sbin/slapd -h ldap:/// ldapi:/// -g openldap -u openldap -F /etc/ldap/slapd.d
Aug 31 20:26:05 Node1 systemd[1]: Starting LSB: OpenLDAP standalone server (Lightweight Directory Access Protocol)...
Aug 31 20:26:05 Node1 slapd[16613]: * Starting OpenLDAP slapd
Aug 31 20:26:05 Node1 slapd[16621]: @(#) $OpenLDAP: slapd (Ubuntu) (May 22 2018 13:54:12) $
buildd@lcy01-amd64-019:/build/openldap-t_Ta0O/openldap-2.4.42+dfsg/debian/build/servers/slapd
Aug 31 20:26:05 Node1 slapd[16622]: slapd starting
Aug 31 20:26:05 Node1 slapd[16613]: ...done.
Aug 31 20:26:05 Node1 systemd[1]: Started LSB: OpenLDAP standalone server (Lightweight Directory Access Protocol).

Configure OpenLDAP Server

dpkg-reconfigure slapd
Moving old database directory to /var/backups:
- directory unknown... done.
Creating initial configuration... done.
Creating LDAP directory... done.
ldapsearch -x
# extended LDIF
#
# LDAPv3
# base <dc=example,dc=com> (default) with scope subtree
# filter: (objectclass=*)
# requesting: ALL
#
# example.com
dn: dc=example,dc=com
objectClass: top
objectClass: dcObject
objectClass: organization
o: example
dc: example
# admin, example.com
dn: cn=admin,dc=example,dc=com
objectClass: simpleSecurityObject
objectClass: organizationalRole
cn: admin
description: LDAP administrator
# search result
search: 2
result: 0 Success
# numResponses: 3
# numEntries: 2

Install phpLDAPadmin

apt-get install phpldapadmin -y
nano /etc/phpldapadmin/config.php
$servers->setValue('server','name','OpenLDAP Server');
$servers->setValue('server','base', array('dc=example,dc=com'));
#Disallow public access by comment out the following line:
#$servers->setValue('login','bind_id','cn=admin,dc=example,dc=com');
$config->custom->appearance['hide_template_warning'] = true;
systemctl restart slapd

Access phpLDAPadmin Web Interface

Create Organization Unit

Create Groups

Conclusion

--

--

--

Follow me to keep abreast with the latest technology news, industry insights, and developer trends. Alibaba Cloud website:https://www.alibabacloud.com

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Setting up a PostgreSQL database on an Ubuntu instance

HTML5 UP (Identity) with AMP

Download Mac Os High Sierra On Pc

Top 5 Reasons to Choose Java as an Option

Five Reason to choose Java in Web Development. Infiraise Helps in Offering Many solutions in Web and Mobile Development.

Spring Boot 2.3.0 — BuildPack Support and Layered JARs

Working with WireMock

How to Migrate from ELK to Log Service

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Alibaba Cloud

Alibaba Cloud

Follow me to keep abreast with the latest technology news, industry insights, and developer trends. Alibaba Cloud website:https://www.alibabacloud.com

More from Medium

Getting started with Akka Cluster

Akka Cluster Member States

Provision a Object Storage cluster with Leaseweb Dedicated Server API

Running ROS workspace tests with GitHub Actions in 3 Steps