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

How to Create Your own Map backend like Google Map…

How to Manage Your Alibaba Cloud Linux Server from the Command Line Interface (CLI)

Git for beginners

Kotlin — Efficient code finds your next flight

FINN.no loves Kotlin

Introducing $GAME tokens —  Tokenomics and Distribution | GameBox Network

First Principles Python Part 3: Data Types

Static Volume Provisioning in Oracle Container Engine for Kubernetes(OKE) with Container Storage…

Persona migration to Ark Core V2.3

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

Hadoop Cluster Configuration Using Ansible

How to install Elasticsearch and Kibana version 8.1 on RHEL For Beginner

Produce and consume messages from a Kafka topic using docker

CI/CD Pipeline for API using WSO2 API controller and Jenkins