Archive for June, 2007

Instalar OpenLDAP en Debian

Tuesday, June 26th, 2007

Para instalar el servidor tecleamos:

apt-get install slapd

Al terminar la configuracion nos pedira una clave para el usuario admin.

Podemos gestionar el servidor ldap con los comandos slap* y también podemos instalar un gestor Web como phpldapadmin (ver Instalación de Apache, PHP, MySQL y phpmyadmin en Debian), tecleamos:

apt-get install phpldapadmin

Para entrar al gestor abrimos una ventana del navegador Web y escribimos http://localhost/phpldapadmin

Ahora tendremos que escribir el nombre del usuario completo (puede verse con el comando slapcat) por defecto es: cn=admin, dc=nodomain.

Si todo ha ido bien ya deberiamos estar dentro.

phpLDAPadmin

Autentificación LDAP en Apache 2

Tuesday, June 26th, 2007

En el fichero httpd.conf en el area server config tenemos que poner el tipo de seguridad que utiliza nuestro LDAP. Por ejemplo:

LDAPTrustedMode NONE

Admite 3 tipos, NONE, SSL y TLS/STARTTLS.

Despues en nuestro virtual host tenemos que agregar las siguientes opciones marcadas en rojo:

<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
# This directive allows us to have apache2’s default start page
# in /apache2-default/, but still have / go to the right place
#RedirectMatch ^/$ /apache2-default/
AuthType Basic
AuthName “acceso LDAP”
AuthBasicProvider ldap
AuthzLDAPAuthoritative off
AuthLDAPURL “ldap://localhost:389/dc=nodomain”
Require valid-user

</Directory>

Y con eso ya estaría, si alguien consigue pasar la autentificacion Web a Drupal que me avise ;)