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/27 07:44] – [LDAP] javi | informatica:linux:mediawiki [2015/04/13 20:19] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 155: | 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 161: | 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 189: | 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 197: | Line 282: | ||
sudo pear install mail net_smtp | sudo pear install mail net_smtp | ||
- | | + | |
- | 3. Editar: | + | ==== Postfix ==== |
+ | |||
+ | 1. Editar: | ||
sudo cp / | sudo cp / | ||
Line 216: | Line 303: | ||
$wgSMTP = array( | $wgSMTP = array( | ||
' | ' | ||
- | ' | + | ' |
' | ' | ||
' | ' | ||
Line 224: | Line 311: | ||
**IMPORTANTE**: | **IMPORTANTE**: | ||
- | 4. Editar el archivo de config de postfix: | + | 2. Editar el archivo de config de postfix: |
sudo cp / | sudo cp / | ||
Line 231: | Line 318: | ||
Y asegurarse que las lineas quedan asi: | Y asegurarse que las lineas quedan asi: | ||
- | myhostname = www-1.dev.local.jamgo.org | + | myhostname = www-1.dev.local.example.com |
- | mydestination = www-1.dev.local.jamgo.org | + | mydestination = www-1.dev.local.example.com |
- | 5. Reiniciar servicios: | + | 3. Reiniciar servicios: |
sudo / | sudo / | ||
sudo / | sudo / | ||
+ | |||
+ | ==== Ssmtp ==== | ||
+ | |||
+ | 1. Editar: | ||
+ | |||
+ | sudo cp / | ||
+ | sudo vim / | ||
| | ||
- | 6. Configurar el usuario " | + | 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: | ||
- | 6.1. Iniciar sesion en mediawiki | + | update user set user_password=md5(concat(user_id,' |
- | 6.2. Ir a " | + | Para cambiar la password del WikiSysop: |
- | 6.3. Asegurarse que tiene direccion de correo valida y marcar todas las opciones de la caja "Email options" | + | update user set user_password=md5(concat(' |
- | 6.4. Editar " | + | Para agregar |
- | 7. Con el usuario | + | insert into user(user_name) values ("userName"); |
informatica/linux/mediawiki.1377589480.txt.gz · Last modified: 2015/04/13 20:19 (external edit)