This is an old revision of the document!
OpenLDAP Server on Debian
This will be based on this article at HowToForge.
Starting from a fresh (template) Debian install, we'll have to use one Bridged adapter on this VM since it has to be accessible from outside the hypervisor's sub-networks.
> nano /etc/network/interfaces ... # The primary network interface auto eth0 iface eth0 inet static #dns-nameservers 8.8.8.8 address 192.168.1.XXX netmask 255.255.255.0 broadcast 192.168.1.255 network 192.168.1.0 ...
Install OpenLDAP packages
> apt-get update > apt-get install slapd ldap-utils
Configure LDAP:
> nano /etc/ldap/ldap.conf # # LDAP Defaults # # See ldap.conf(5) for details # This file should be world readable but not world writable. BASE dc=home,dc=brussels URI ldap://192.168.1.201 ldap://192.168.1.201:666 #SIZELIMIT 12 #TIMELIMIT 15 #DEREF never # TLS certificates (needed for GnuTLS) TLS_CACERT /etc/ssl/certs/ca-certificates.crt
Then we reconfigure the LDAP package with the newly introduced values:
> dpkg-reconfigure slapd
* Omit: NO * DNS domain name: home.brussels * Organisation: Family * Password: ***** * Database: HDB * Remove when purged: YES * Move old: YES * LDAPv2: NO
Check install with:
> ldapsearch -x
Install phpLDAPadmin
We need an Apache server, php and MySQL installed to run phpLDAPadmin Web GUI:
> apt-get install apache2 php5 php5-mysql > apt-get install phpldapadmin
Then we configure phpLDAPadmin:
> nano /etc/phpldapadmin/config.php [line 286] $servers->setValue('server','name','Home LDAP Server'); [line 300] $servers->setValue('server','base',array('dc=home,dc=brussels')); [line 326] $servers->setValue('login','bind_id','cn=admin,dc=home,dc=brussels');
Now we should be able to access the phpLDAPadmin Web GUI at http://192.168.1.201/phpldapadmin