Bienvenido(a) a Alcance Libre 05/09/2025, 19:53
Instalar y configurar dhcp-ldap en CentOS 5
Autor: Reforen
Correo electrónico: sackphootas@hotmail.com
Procedencia del autor: México
Primero que nada ocupamos instalar openldap
[root@localhost ~]# yum -y install openldap openldap-clients openldap-server
Aquí tenemos que descargar dhcp.schema
[root@localhost ~]# cd /etc/openldap/schema
[root@localhost ~]# wget http://www.grotan.com/ldap/dhcp.schema
Después hay que darle un password a nuestro servicio
[root@localhost ~]# slappasswd
New password:
Re-enter new password:
Nos mandara el password encriptado con {SSHA}
{SSHA} XXXXXXXXX-XXXXXXXXXXX
Copiamos esa línea de salida, luego modificamos lo siguiente en el archivo
[root@localhost ~]# nano /etc/openldap/slapd.conf
# This file should NOT be world readable.
#
include /etc/openldap/schema/core.schema
include /etc/openldap/schema/cosine.schema
include /etc/openldap/schema/inetorgperson.schema
include /etc/openldap/schema/nis.schema
include /etc/openldap/schema/dhcp.schema
[..]
database bdb
suffix "dc=su-red-local,dc=com"
#We dont want our LDAP root user to be called root :P that is not Windows like
rootdn "cn=Manager,dc=su-red-local,dc=com"
#Aquí va nuestro password adquirido
rootpw {SSHA} XXXXXXXXX-XXXXXXXXXXX
#Here our Sleepycat DB will be saved, slapd must own this folder and files
directory /var/lib/ldap
[..]
# Indices to maintain for this database
index dhcpHWAddress eq
index dhcpClassData eq
index default sub
Después configuramos los archivos para el cliente
[root@localhost ~]# nano /etc/ldap.conf:
host 127.0.0.1
base dc=su-red-local,dc=com
[root@localhost ~]# nano /etc/openldap/ldap.conf
HOST 127.0.0.1
BASE dc=su-red-local,dc=com
Por ultimo configuramos ldap para arrancar con el sistema y lo iniciamos
[root@localhost ~]# chkconfig ldap on
[root@localhost ~]# service ldap restart