Configure phpldapadmin for OpenLDAP Server (CentOS 7)

A. Server Configuration
    192.168.100.195  ldapserver.geekonline.in
    192.168.100.196  client1.geekonline.in
    For detailed LDAP configuration please visit this post.

B. Install phpldapadmin on same server

1.  Install epel repository on the server
    # rpm -ivh  https://download1.rpmfusion.org/nonfree/el/rpmfusion-nonfree-release-7.noarch.rpm

2.  Install phpldapadmin package
     #yum install phpldapadmin
     

3. Take backup of phpldapadmin config file and make the necessary changes
    # cp config.php config.php.orig
    # vi config.php
    Go to line 397 comment it and uncomment line 398
     $servers->setValue('login','attr','dn');
     // $servers->setValue('login','attr','uid');
     

4. Enable httpd service and add firewall rules for httpd service
    #systemctl enable httpd
    #firewall-cmd --permanent --add-port=80/tcp
    #firewall-cmd --reload

5. Try to access phpldapadmin page
    http://192.168.100.195
    while accessing the page It gives below error
    

6. To resolve this Edit the apache configuration file for phpldapadmin
    #cd /etc/httpd/conf.d/
    #vi phpldapadmin.conf
    change the entry from "require local" to "require all granted"
    Save config file and reload apache service
    #systemctl reload httpd
    

7. Now open the page 192.168.100.195/phpldapadmin
    
8. Login on the server
    

9. Now edit the phpldapadmin config file and change The name from Local LDAP server to Geekonline.in LDAP server on Line no 291
    #cd /etc/phpldapadmin
    #vi config.php
    

10. Refresh the page without restarting/reloading httpd service
    

B. Install phpldapadmin on different server 
1. All steps will be same for installation and configuration phpldapadmin on different server.
    Only below additional change in phpldapadmin config is required  on line no 298 
    Change IP address from 127.0.0.1 to OpenLDAP server IP address
        

2. Access the phpldapadmin webpage on the server 
    http://192.168.100.196/phplapadmin
    

Summary:
1. We can configure  phpldapadmin on same server or another server.
2. Managing users and groups on OpenLDAP server becomes easy.  
  
    
    



 

Leave a Reply

Your email address will not be published. Required fields are marked *

*

* Copy This Password *

* Type Or Paste Password Here *

3,435 Spam Comments Blocked so far by Spam Free Wordpress

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>