Install LDAP Server and phpldapadmin on ubuntu 12.04 LTS

Aus Bitbull Wiki
Wechseln zu: Navigation, Suche

LDAP Server


apt-get install slapd ldap-utils
pw: dontcare
dpkg-reconfigure slapd
   Omit OpenLDAP server configuration? No
   DNS domain name: tux.local
   Organization name: tuxhome
   Password: nicht egal
   Database backend to use: HDB
   Do you want the database to be removed when slapd is purged? Yes
   Move old database? No
   Allow LDAPv2 protocol? No
  • see if domain name is in config now
grep tux /etc/ldap/slapd.d/cn\=config/olcDatabase\=\{1\}hdb.ldif
  • search ldap for new config
ldapsearch -x -b "dc=tux,dc=local"

configure ldap server

  • /etc/ldap/backend.ldiff
dn: ou=people,dc=tux,dc=local
objectClass: organizationalUnit
ou: people

dn: ou=groups,dc=tux,dc=local
objectClass: organizationalUnit
ou: groups
ldapadd -x -D "cn=admin,dc=tux,dc=local" -f /etc/ldap/backend.ldif -W
  Enter LDAP Password: 
  adding new entry "ou=people,dc=tux,dc=local"
  adding new entry "ou=groups,dc=tux,dc=local"
  • search ldap for new config
ldapsearch -x -b "dc=tux,dc=local"

install phpldapadmin

apt-get install phpldapadmin

configure phplsapadmin

  • /etc/phpldapadmin/config.php
// $servers->setValue('server','base',array('dc=example,dc=com'));