informatica:linux:mediawiki
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
informatica:linux:mediawiki [2013/08/26 15:18] – [Redirecciones] javi | informatica:linux:mediawiki [2015/04/13 20:19] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 136: | Line 136: | ||
$wgLDAPBaseDNs = array( | $wgLDAPBaseDNs = array( | ||
' | ' | ||
+ | ); | ||
+ | # Optional: to pull e-mail address for the user from LDAP | ||
+ | $wgLDAPPreferences = array( | ||
+ | ' | ||
); | ); | ||
Line 151: | Line 155: | ||
# TODO: fix this, needed by LDAP in mediawiki | # TODO: fix this, needed by LDAP in mediawiki | ||
- | TLS_REQCERT | + | TLS_REQCERT |
5.2. Reinicio Apache | 5.2. Reinicio Apache | ||
Line 157: | Line 161: | ||
sudo / | sudo / | ||
| | ||
+ | ==== Restringir login en funcion del grupo ==== | ||
+ | |||
+ | * En este ejemplo ademas tomamos el e-mail de LDAP | ||
+ | * Grupo LDAP requerido: " | ||
+ | * Usuario LDAP de ejemplo: " | ||
+ | |||
+ | 1. Objetos LDAP: | ||
+ | |||
+ | < | ||
+ | # LDAP user | ||
+ | dn: cn=LDAP_USER_1, | ||
+ | cn: LDAP_USER_1 | ||
+ | gidnumber: 10001 | ||
+ | givenname: Name | ||
+ | homedirectory: | ||
+ | loginshell: /bin/bash | ||
+ | mail: LDAP_USER_1@example.com | ||
+ | objectclass: | ||
+ | objectclass: | ||
+ | objectclass: | ||
+ | sn: Surename | ||
+ | uid: LDAP_USER_1 | ||
+ | uidnumber: 10001 | ||
+ | userpassword: | ||
+ | |||
+ | # LDAP group | ||
+ | dn: cn=ldapwiki, | ||
+ | cn: ldapwiki | ||
+ | gidnumber: 10004 | ||
+ | memberuid: LDAP_USER_1 | ||
+ | memberuid: LDAP_USER_2 | ||
+ | objectclass: | ||
+ | objectclass: | ||
+ | </ | ||
+ | |||
+ | 2. Configuracion mediawiki (archivo " | ||
+ | |||
+ | < | ||
+ | # LDAP | ||
+ | require_once ' | ||
+ | require_once ' | ||
+ | $wgAuth = new LdapAuthenticationPlugin(); | ||
+ | $wgLDAPDomainNames = array( | ||
+ | ' | ||
+ | ); | ||
+ | $wgLDAPServerNames = array( | ||
+ | ' | ||
+ | ); | ||
+ | $wgLDAPUseLocal = false; | ||
+ | $wgLDAPEncryptionType = array( | ||
+ | ' | ||
+ | ); | ||
+ | $wgLDAPPort = array( | ||
+ | ' | ||
+ | ); | ||
+ | $wgLDAPProxyAgent = array( | ||
+ | ' | ||
+ | ); | ||
+ | $wgLDAPProxyAgentPassword = array( | ||
+ | ' | ||
+ | ); | ||
+ | $wgLDAPSearchAttributes = array( | ||
+ | ' | ||
+ | ); | ||
+ | $wgLDAPBaseDNs = array( | ||
+ | ' | ||
+ | ); | ||
+ | # To pull e-mail address from LDAP | ||
+ | $wgLDAPPreferences = array( | ||
+ | ' | ||
+ | ); | ||
+ | # Group based restriction | ||
+ | $wgLDAPGroupUseFullDN = array( " | ||
+ | $wgLDAPGroupObjectclass = array( " | ||
+ | $wgLDAPGroupAttribute = array( " | ||
+ | $wgLDAPGroupSearchNestedGroups = array( " | ||
+ | $wgLDAPGroupNameAttribute = array( " | ||
+ | $wgLDAPRequiredGroups = array( " | ||
+ | $wgLDAPLowerCaseUsername = array( | ||
+ | ' | ||
+ | ); | ||
+ | </ | ||
===== Reducir el numero de encabezados que genera un TOC (Table Of Contents) ===== | ===== Reducir el numero de encabezados que genera un TOC (Table Of Contents) ===== | ||
Line 185: | Line 271: | ||
| | ||
===== Envio de correos ===== | ===== Envio de correos ===== | ||
+ | |||
+ | **TODO**: comprobar si los pasos 1 y 2 son necesarios si se usa ssmtp en lugar de postfix | ||
+ | |||
1. Instalar PHP PEAR: | 1. Instalar PHP PEAR: | ||
Line 193: | Line 282: | ||
sudo pear install mail net_smtp | sudo pear install mail net_smtp | ||
- | | + | |
- | 3. Editar: | + | ==== Postfix ==== |
+ | |||
+ | 1. Editar: | ||
sudo cp / | sudo cp / | ||
Line 212: | Line 303: | ||
$wgSMTP = array( | $wgSMTP = array( | ||
' | ' | ||
- | ' | + | ' |
' | ' | ||
' | ' | ||
); | ); | ||
</ | </ | ||
+ | |||
+ | **IMPORTANTE**: | ||
+ | |||
+ | 2. Editar el archivo de config de postfix: | ||
+ | |||
+ | sudo cp / | ||
+ | sudo vim / | ||
+ | | ||
+ | Y asegurarse que las lineas quedan asi: | ||
+ | |||
+ | myhostname = www-1.dev.local.example.com | ||
+ | mydestination = www-1.dev.local.example.com | ||
+ | |||
+ | 3. Reiniciar servicios: | ||
+ | |||
+ | sudo / | ||
+ | sudo / | ||
+ | |||
+ | ==== Ssmtp ==== | ||
+ | |||
+ | 1. Editar: | ||
+ | |||
+ | sudo cp / | ||
+ | sudo vim / | ||
+ | | ||
+ | Y anyadir las siguientes lineas: | ||
+ | |||
+ | < | ||
+ | |||
+ | $wgEnableEmail = true; | ||
+ | $wgEnableUserEmail = true; | ||
+ | $wgEmergencyContact = " | ||
+ | $wgPasswordSender = " | ||
+ | $wgEnotifUserTalk = true; | ||
+ | $wgEnotifWatchlist = true; | ||
+ | </ | ||
+ | |||
+ | ==== Comprobar sistema de correo ==== | ||
+ | |||
+ | 1. Configurar el usuario " | ||
+ | |||
+ | 1.1. Iniciar sesion en mediawiki | ||
+ | |||
+ | 1.2. Ir a " | ||
+ | |||
+ | 1.3. Asegurarse que tiene direccion de correo valida y marcar todas las opciones de la caja "Email options" | ||
+ | |||
+ | 1.4. Editar " | ||
+ | |||
+ | 2. Iniciar sesion Con el usuario " | ||
+ | |||
+ | Deberia enviarse el correo. Si no es asi, por si acaso cerrar sesion con ambos usuarios, iniciar sesion con usuario " | ||
+ | ===== Contrasenas ===== | ||
+ | |||
+ | Seleccionar la base de datos correspondiente: | ||
+ | |||
+ | use mediawikidb; | ||
+ | |||
+ | Para cambiar la password de un user normal: | ||
+ | |||
+ | update user set user_password=md5(concat(user_id,' | ||
+ | |||
+ | Para cambiar la password del WikiSysop: | ||
+ | |||
+ | update user set user_password=md5(concat(' | ||
+ | |||
+ | Para agregar un user (un userName siempre debe comezar por mayúscula): | ||
+ | |||
+ | insert into user(user_name) values (" | ||
+ |
informatica/linux/mediawiki.1377530291.txt.gz · Last modified: 2015/04/13 20:19 (external edit)