본문 바로가기

기타

[LDAP] phpLDAPadmin 설치 및 연동

728x90

phpLDAPadmin 설치 및 openldap 연동

phpLDAPadmin 설치

$ yum install -y epel-release

$ yum install -y phpldapadmin

phpldapadmin.conf 편집

 - Require all granted 추가

$ vim /etc/httpd/conf.d/phpldapadmin.conf
#
#  Web-based tool for managing LDAP servers
#

Alias /phpldapadmin /usr/share/phpldapadmin/htdocs
Alias /ldapadmin /usr/share/phpldapadmin/htdocs

<Directory /usr/share/phpldapadmin/htdocs>
  <IfModule mod_authz_core.c>
    # Apache 2.4
    Require local
    Require all granted
  </IfModule>
  <IfModule !mod_authz_core.c>
    # Apache 2.2
    Order Deny,Allow
    Deny from all
    Allow from 127.0.0.1
    Allow from ::1
  </IfModule>
</Directory>

웹 서버 재기동

$ systemctl restart httpd

config.php 편집

$ vim /etc/phpldapadmin/config.php
...
283 $servers = new Datastore();
291 $servers->setValue('server','name','Local LDAP Server');
298 $servers->setValue('server','host','192.168.56.111');
301 $servers->setValue('server','port',389);
305 $servers->setValue('server','base',array('dc=4wxyz,dc=com'));
323 $servers->setValue('login','auth_type','cookie');
332 $servers->setValue('login','bind_id','cn=Manager,dc=4wxyz,dc=com');
340 $servers->setValue('server','tls',false);
397 $servers->setValue('login','attr','dn');

WEB UI

Login DN: cn=Manager,dc=4wxyz,dc=com

Password: {slappasswd 생성할 때 사용한 패스워드}

728x90