Hostname : ldap.ubuntu.co.id
IP Address : 192.168.169.2
### Install openLDAP
root@ubuntu:~# apt-get install slapd ldap-utils
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
libldap-2.4-2 libodbc1
Suggested packages:
libmyodbc odbc-postgresql tdsodbc unixodbc-bin
The following NEW packages will be installed:
ldap-utils libodbc1 slapd
The following packages will be upgraded:
libldap-2.4-2
1 upgraded, 3 newly installed, 0 to remove and 434 not upgraded.
Need to get 2,423 kB of archives.
After this operation, 5,515 kB of additional disk space will be used.
Do you want to continue [Y/n]?
pada saat instalasi akan password untuk Administrator LDAP
Administrator password : cikarang
### Configure file /etc/ldap/ldap.conf
root@ubuntu:~# nano /etc/ldap/ldap.conf
...
BASE dc=ubuntu,dc=co,dc=id
URI ldap://192.168.169.2
...
### Run the Configuration Assistant
root@ubuntu:~# dpkg-reconfigure slapd
Omit OpenLDAP server configuration? NO
DNS domain name? ubuntu.co.id
Organization name? ubuntu
Administrator password? cikarang
Confirm password? cikarang
Database backend to use? HDB
Do you want the database to be removed when slapd is purged? YES
Move old database? YES
Allow LDAPv2 protocal? NO
LDAP server is up and running now.
### TESTING
root@ubuntu:~# ldapsearch -x
# extended LDIF
#
# LDAPv3
# base
# filter: (objectclass=*)
# requesting: ALL
#
# transvision.co.id
dn: dc=ubuntu,dc=co,dc=id
objectClass: top
objectClass: dcObject
objectClass: organization
o: ubuntu
dc: ubuntu
# admin, ubuntu.co.id
dn: cn=admin,dc=ubuntu,dc=co,dc=id
objectClass: simpleSecurityObject
objectClass: organizationalRole
cn: admin
description: LDAP administrator
# search result
search: 2
result: 0 Success
# numResponses: 3
# numEntries: 2
### Troubleshoot
1. Cek Service
root@ubuntu:~# service slapd status
* slapd is running
2 Cek port
root@ubuntu:~# nmap 192.168.169.2
Starting Nmap 5.21 ( http://nmap.org ) at 2015-06-10 23:23 UTC
Nmap scan report for 192.168.169.2
Host is up (0.0000040s latency).
Not shown: 999 closed ports
PORT STATE SERVICE
389/tcp open ldap
Nmap done: 1 IP address (1 host up) scanned in 0.55 seconds
3. Cek proses
root@ubuntu:~# ps aux|grep ldap
openldap 5883 0.0 0.1 275536 5092 ? Ssl 23:20 0:00 /usr/sbin/slapd -h ldap:/// ldapi:/// -g openldap -u openldap -F /etc/ldap/slapd.d