home       inleiding       sysadmin       services       links       bash       werk       nothing      

phpLDAPadmin

phpLDAPadmin is an LDAP browser. It will give you access to LDAP via a GUI inside an internet browser like firefox.
 

  1. install phpLDAPadmin
     
    We install as follows:
    $ sudo apt-get install phpldapadmin
    The following extra packages will be installed: apache2 apache2-mpm-prefork apache2-utils apache2.2-bin apache2.2-common libapache2-mod-php5 libapr1
    libaprutil1 libaprutil1-dbd-sqlite3 libaprutil1-ldap libcap2 libltdl7 libodbc1 libperl5.14 libslp1 php5-cli php5-common php5-fpm php5-ldap ssl-cert

    Notice that apache2, php5 and their dependencies will be installed. Yes, php always runs under apache2 and phpldapadmin is a php-web-application.
     

  2. configure apache2
     
    Obviously, we need to set up apache2 and php in order to get phpLDAPadmin running.
    I refer to this website and recommend reading apache2-php-mysql, without the need to configure mysql.
     
  3. configure phpLDAPadmin
     
    First check the root-folder of the default apache website.
     
    $ grep DocumentRoot /etc/apache2/sites-enabled/000-default.conf
    DocumentRoot /var/www/html
     
    In your case your root might be different.
     
    You can also install phpLDAPadmin in an apache2 virtualhost. In that case you can set the Documentroot in your vhost.conf file, somewhere inside /etc/apache2/sites-enabled
     
    Now copy the phpLDAPadmin ‘website’ to /var/www/html, the root of the apache2 server:
     
    $ sudo cp -rvpdu /usr/share/phpldapadmin/* /var/www/hyml
     
    Next we remove the left over index.html file from apache’s initial config:
     
    $ sudo rm /var/www/html/index.html
     
    Finally we configure phpldapadmin by editing the config file:
     
    $ sudo vim /etc/phpldapadmin/config.php
     
    we changed the following values:
    $servers->setValue('server','name','myldapserver.linux800.net');
    $servers->setValue('server','host','127.0.0.1');
    $servers->setValue('server','base',array('dc=linux800,dc=net'));
    $servers->setValue('login','bind_id','cn=admin,dc=linux800,dc=net');
  4. test your phpldapadmin
     
    The last step is to restart the apache webserver:
     
    $ sudo /etc/init.d/apache2 restart
     
    Next we can point our graphical internet-browser to the ipaddress of our ldapserver, and look inside the LDAP-directory.
     
    phpldapadmin