LDAP authentication
Nota: Pendiente de Traducir. ¡Anímese a traducir esta página!. ( y otras páginas pendientes)
Autentificación LDAP
Este documento describe cómo establecer una autentificación LDAP en Moodle. Puede encontrar un Escenario Básico(Basic Scenario), en el cuál todo es simple y avanzar, y eso será suficiente en la mayoría de las instalaciones. Si su instalación es un poco más grande y utiliza múltiples servidores LDAP, o múltiples localizaciones( contextos) para sus usuarios en su árbol LDAP, entonces tiene que explorar Escenarios Avanzados(Advanced Scenarios).
Escenario Básico
Suposiciones
- La dirección en internet de su sitio moodle es http://su.sitio.moodle/
- Tiene configurada su instalación PHP con la extensión LDAP. Está cargada y activada, y se muestra cuando va a http://su.sitio.moodle/admin/phpinfo.php (identificándose (log in)como 'admin').
- La dirección IP de su servidor LDAP es 192.168.1.100 .
- No utiliza LDAP con SSL ( conocido como LDAPS) en sus especificaciones iniciales. Esto podría impedir ciertas operaciones(por ejemplo, no puede actualizar datos si utiliza el Directorio Activo MS -- MS-AD from here on --), pero funcionaría si únicamente quiere autentificar sus usuarios.
- No quiere que sus usuarios cambien sus contraseñas (passwords) la primera vez que se registren (log in)en Moodle.
- Está utilizando un dominio simple como fuente de sus datos de autentificación, en caso de que esté utilizando MS-AD( más adelante en los Apéndices).
- Está utilizando un nivel superior de DN (de dc=mi,dc=organizacion,dc=dominio)como raíz de su árbol LDAP.
- Tiene una no-privilegiada cuenta de usuario LDAP que utilizará para enlazar con el servidor LDAP. Esto no es necesario con ciertos servidores LDAP, pero MS-AD requiere ésto y no estará de más utilizarlo incluso si su servidor LDAP no lo necesita. Asegúrese de que la cuenta y contraseña son válidas, y haga a su contraseña tan segura como le sea posible. Recuerde que sólo necesita teclearla una vez, cuando configura Moodle, procure que no sea conocida. Permítanos decir que esa cuenta de usuario tiene una DN como cn=usuario-ldap, dc=mi, dc=organizacion, dc=dominio, y contraseña.
- Todos sus usuarios en Moodle están en una unidad compacta (organizational unit (OU))denominada usuariosenmoodle(moodleusers, que se encuentra en su raíz LDAP. Esa OU tiene una DN como ou=usuariosenmoodle, dc=mi, dc=organizacion, dc=dominio.
- No desea que las contraseñas de sus usuarios LDAP se almacenen en Moodle.
Configurando la autentificación Moodle
Entre como (Log in) usuario admin y vaya a Administración>>Usuarios>>Autentificación( Administration >> Users >> Authentication). En el cuadro de lista inferior nombrado como "Seleccionar método de autentificación(Choose an authentication method)" elija "Usar un servidor LDAP( Use an LDAP Server)". Llegará a una página similar a ésta:
Ahora, simplemente rellene los campos; paso a paso:
Nombre de Campo | Valor |
---|---|
url_anfitrión_ldap(ldap_host_url) | Como la dirección IP de su servidor LDAP es 192.168.1.100, ponga "ldap://192.168.1.100" (sin las comillas). |
versión_ldap(ldap_version) | A no ser que esté utilizando versiones antiguas, version 3 es su única opción. |
ldap_preventpassindb | Como usted no quiere almacenar las contraseñas de usuario en la base de datos Moodle, seleccione Si(Yes). |
ldap_bind_dn | Este es el nombre del This is the distinguished name of the bind user defined above. Just type "cn=ldap-user,dc=my,dc=organization,dc=domain" (without the quotes). |
ldap_bind_pw | This is the bind user password defined above. Type "hardtoguesspassword" (without the quotes). |
ldap_user_type | Choose:
|
ldap_contexts | The DN of the context (container) where all of your Moodle users are found. Type ou=moodleusers,dc=my,dc=organization,dc=domain here. |
ldap_search_sub | If you have any sub organizational units (subcontexts) hanging from ou=moodleusers,dc=my,dc=organization,dc=domain and you want Moodle to search there too, set this to yes. Otherwise, set this to no. |
ldap_opt_deref | Sometimes your LDAP server will tell you that the real value you are searching for is in fact in another part of the LDAP tree (this is called an alias). If you want Moodle to 'dereference' the alias and fetch the real value from the original location, set this to yes. If you don't want Moodle to dereference it, set this to no. If you are using MS-AD, set this to no. |
ldap_user_attribute | The attribute used to name/search users in your LDAP tree. This option takes a default value based on the ldap_user_type value you choosed above. So unless you need something special, you don't need to fill this in.
By the way, it's usually cn (Novell eDirectory and MS-AD) or uid (RFC-2037, RFC-2037bis and SAMBA 3.x LDAP extension), but if you are using MS-AD you could use sAMAccountName (the pre-Windows 2000 logon account name) if you need too. |
ldap_memberattribute | The attribute used to list the members of a given group. This option takes a default value based on the ldap_user_type value you choosed above. So unless you need something special, you don't need to fill this in.
By the way, the usual value is member. |
ldap_objectclass | The type of LDAP object used to search for users. This option takes a default value based on the ldap_user_type value you choosed above. So unless you need something special, you don't need to fill this in.
Here are the default values for each of the ldap_user_type values:
|
Force change password | Set this to Yes if you want to force your users to change their password on the first login into Moodle. Otherwise, set this to no. Bear in mind the password they are forced to change is the one stored in your LDAP server.
As you don't want your users to change their passwords in their first login, leave this set to No |
Use standard Change Password Page |
Bear in mind that changing your LDAP passwords from Moodle might require a LDAPS connection (this is true at least for MS-AD). Also, code for changing passwords from Moodle for anything but Novell eDirectory is almost not tested, so this may or may not work for other LDAP servers. |
ldap_expiration |
Current code only deals with Novell eDirectory LDAP server, but there is a patch floating around to make it work with MS-AD too (search in the authentication forum). So unless you have Novell eDirectory server (or use the patch), choose No here. |
ldap_expiration_warning | This value sets how many days in advance of password expiration the user is warned that her password is about to expire. |
ldap_exprireattr | The LDAP user attribute used to check password expiration. This option takes a default value based on the ldap_user_type value you choosed above. So unless you need something special, you don't need to fill this in. |
ldap_gracelogins | This setting is specific to Novell eDirectory. If set to Yes, enable LDAP gracelogin support. After password has expired the user can login until gracelogin count is 0.
So unless you have Novell eDirectory server and want to allow gracelogin support, choose No here. |
ldap_graceattr | This setting is currently not used in the code (and is specific to Novell eDirectory).
So you don't need to fill this in |
ldap_create_context | |
ldap_creators | |
First name | |
Surname | |
Email address | |
Advanced Scenarios
Using multiple LDAP Servers
Using multiple user locations (contexts) in your LDAP tree
Appendices
Talk about Global Catalog servers and MS Active Directory.