User Tools

Site Tools


openldap_centos7

This is an old revision of the document!


OpenLDAP on CentOS 7

Preparation

  • Do a clean minimal installation
  • Install chronyd and configure timeserver
  • Install initial firewall rules

Installation

Base

yum install openldap-servers openldap-clients

Install my created superscript, including LDIF files! Answer all the questions and you have an empty LDAP server.

cd /root
tar -xvzf ldap-latest.tar.gz
cd ldap
./generate_slapd.sh
firewall-cmd --permanent --zone=management --add-service=ldap
firewall-cmd --permanent --zone=management --add-service=ldaps
firewall-cmd --permanent --zone=local --add-service=ldap
firewall-cmd --permanent --zone=local --add-service=ldaps

phpldapadmin

yum install phpldapadmin

Configuration

vi /etc/phpldapadmin/config.php

Change line 397 en 398 in the following:

// $server->setValue('login','attr','uid');
$server->setValue('login','attr','dn');
vi /etc/httpd/conf.d/phpldapadmin.conf

Change

Require local

in

Require all granted
setsebool -P httpd_can_connect_ldap 1
firewall-cmd --permanent --zone=management --add-service=http
firewall-cmd --permanent --zone=local --add-service=http
systemctl enable httpd
systemctl enable slapd
systemctl start httpd
systemctl start slapd
firewall-cmd --reload
openldap_centos7.1435147375.txt.gz · Last modified: by herwarth