Index: scripts/ltsp-server/backupltsp.sh
===================================================================
--- scripts/ltsp-server/backupltsp.sh	(nonexistent)
+++ scripts/ltsp-server/backupltsp.sh	(revision 535)
@@ -0,0 +1,35 @@
+#!/bin/bash
+#Hace una copia de seguridad de los ficheros relevantes de los servidores de aula de la red:
+#   /etc/udev/rules.d/70-persistent-net.rules
+#   /var/lib/aulalinex-profesor/aulalinex-profesor.conf
+#   /var/lib/aulalinex-profesor-ltsp/setup.ini
+#   /etc/hostapd/hostapd.accept
+#   /etc/hostapd/hostapd.conf
+#Ejecutar desde un ordenador donde se tenga relacion de confianza con todos los servidores de aula, para evitar la petición de contraseñas.
+#Version: 1.5
+#Fecha  : 11/10/2012
+#Autor  : Alfonso Pastor
+#         IES Virgen de Guadalupe (Cáceres)
+
+servidoresaula=$(ldapsearch -xLLL -h ldap -b cn=ltsp-server-hosts,ou=Netgroup,dc=instituto,dc=extremadura,dc=es "nisNetgroupTriple" |grep -v "dn:"| cut -f2 -d "(" | cut -f1 -d",")
+
+listaficheros="/etc/udev/rules.d/70-persistent-net.rules /var/lib/aulalinex-profesor/aulalinex-profesor.conf /var/lib/aulalinex-profesor-ltsp/setup.ini /etc/hostapd/hostapd.accept /etc/hostapd/hostapd.conf"
+
+for servidoraula in $servidoresaula
+do
+   echo "Backup de $servidoraula:"
+   mkdir -p backupltsp/$servidoraula
+   for ruta in $listaficheros
+   do
+      fichero=$(basename $ruta)
+      if scp root@$servidoraula:$ruta backupltsp/$servidoraula/$fichero  > /dev/null 2>&1 
+      then
+          echo "  Copiado: $fichero"
+      else
+          echo "  No encontrado: $fichero"
+      fi
+   done
+
+done
+echo "Finalizado: tiene todos los datos que se han podido copiar en ./backupltsp"
+

Property changes on: scripts/ltsp-server/backupltsp.sh
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: scripts/nfs/limpiar-credenciales.sh
===================================================================
--- scripts/nfs/limpiar-credenciales.sh	(nonexistent)
+++ scripts/nfs/limpiar-credenciales.sh	(revision 535)
@@ -0,0 +1,14 @@
+#!/bin/bash
+# Ejecutar en el servidor nfs. 
+# Borra las credenciales puppet del equipo indicado como parametro.
+# Alfonso Pastor. IES Virgen de Guadalupe.
+if [ $# -ne 1 ]
+then
+  echo "Uso: `basename $0` <nombre equipo>"
+  exit 1
+fi
+equipo=$1
+rm /var/lib/puppet/ssl/ca/signed/${equipo}.vguadalupe.pem
+rm /var/lib/puppet/yaml/node/${equipo}.vguadalupe.yaml
+rm /var/lib/puppet/yaml/facts/${equipo}.vguadalupe.yaml
+

Property changes on: scripts/nfs/limpiar-credenciales.sh
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: scripts/nfs/copiar-escritorio-todos-alumnos.sh
===================================================================
--- scripts/nfs/copiar-escritorio-todos-alumnos.sh	(nonexistent)
+++ scripts/nfs/copiar-escritorio-todos-alumnos.sh	(revision 535)
@@ -0,0 +1,61 @@
+#!/bin/bash
+#Para ejecutar en el servidor nfs
+#Copia un fichero en el escritorio de todos los alumnos.
+#Si se añade el parametro -i el fichero se hace inmutablep para que no pueda ser borrado
+#Alfonso Pastor. IES Virgen de Guadalupe.
+
+function error() {
+   echo "Uso: $0 [-i] fichero"
+   echo "    -i : hacer el fichero inmutable tras copiarlo"
+   exit
+}
+
+function copiar_escritorio() {
+# 3 parametros: ruta home destino, fichero a copiar, "I" hacerlo inmutable
+
+ destino=$1
+ fichero=$2
+ inmutable=$3
+
+ uid=$(stat -c%u $destino)
+ if test ! -d $destino/Desktop
+ then
+     echo "El usuario $destino no tiene escritorio. Creandolo...."
+     mkdir $destino/Desktop
+     chown $uid:$uid $destino/Desktop
+     chmod 2755 $destino/Desktop
+ fi
+ cp -p $fichero $destino/Desktop
+ chown $uid:$uid $destino/Desktop/$fichero
+ if [ "$inmutable" = "I" ]
+ then
+   chattr +i /home/alumnos/$i/Desktop/$fichero
+ fi
+
+}
+
+
+if test $# -eq 0
+then
+   error
+fi
+
+if [ "$1" = "-i" ]
+then
+   cambiar="I"
+   fichero=$2
+   if test -z "$fichero" 
+   then
+           error
+   fi
+else
+   cambiar="N"
+   fichero=$1
+fi
+
+echo "Fichero a copiar: $*"
+for i in $(ls /home/alumnos); do
+    echo "Copiando al escritorio del alumno $i"
+    copiar_escritorio /home/alumnos/$i $fichero $cambiar
+done
+

Property changes on: scripts/nfs/copiar-escritorio-todos-alumnos.sh
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: scripts/nfs/despierta-equipo.sh
===================================================================
--- scripts/nfs/despierta-equipo.sh	(nonexistent)
+++ scripts/nfs/despierta-equipo.sh	(revision 535)
@@ -0,0 +1,20 @@
+#!/bin/bash
+
+#Manda una orden WOL al equipo indicado como parametro. Debe estar dado de alta en ldap.
+#Alfonso Pastor. IES Virgen de Guadalupe.
+
+if [ $# -eq 0 ]; then
+   echo "Uso: $0 hostname ..."
+   exit
+fi
+
+for i in $* 
+do
+   mac=$(ldapsearch -xLLL -h ldap -b cn=$i,cn=group1,cn=INTERNAL,cn=DHCP\ Config,dc=instituto,dc=extremadura,dc=es "dhcpHWAddress" | grep ethernet | grep -v '00:00:00:00:00:00' | cut -f3 -d " "
+)
+   echo "Despertando $i con mac $mac"
+   wakeonlan $mac
+   etherwake $mac
+done
+
+

Property changes on: scripts/nfs/despierta-equipo.sh
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: scripts/nfs/copiar-skel-xfce-todos.sh
===================================================================
--- scripts/nfs/copiar-skel-xfce-todos.sh	(nonexistent)
+++ scripts/nfs/copiar-skel-xfce-todos.sh	(revision 535)
@@ -0,0 +1,34 @@
+#!/bin/bash
+
+#Para ejecutar en el servidor nfs
+#Copia un skel ubicado en /root/scripts/skel-xfce sobre todos los usuarios, preservando los ficheros que ya existan en cada perfil
+#Alfonso Pastor. IES Virgen de Guadalupe.
+
+function copiar_skel() {
+   ruta=$1
+   uid=$(stat -c%u "$ruta")
+   shopt -s dotglob  # Para copiar tambien los archivos ocultos
+   cd /root/scripts/skel-xfce
+   cp -pfR * "$ruta"
+   chown -R $uid:$uid "$ruta"
+   cd -
+   shopt -u dotglob
+}
+
+for i in in $(ls /home/alumnos)
+do
+    echo "Copiando al home alumno $i"
+    copiar_skel "/home/alumnos/$i"
+done
+
+for i in $(ls /home/profesor)
+do
+    if [ "$i" != "/home/profesor/dpto" ]
+    then
+         echo "Copiando al home del profesor $i"
+         copiar_skel "/home/profesor/$i"
+    fi
+done
+
+exit 0
+

Property changes on: scripts/nfs/copiar-skel-xfce-todos.sh
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: scripts/nfs/limpiar_usuarios.sh
===================================================================
--- scripts/nfs/limpiar_usuarios.sh	(nonexistent)
+++ scripts/nfs/limpiar_usuarios.sh	(revision 535)
@@ -0,0 +1,55 @@
+#!/bin/sh
+# Ejecutar en el servidor nfs. Lo ideal es ponerlo en el crontab y ejecutarlo cada noche.
+# Borra los directorios thumbnails (visor de fotos), cache de java, cache de mozilla, 
+# base de datos mozilla, applet actualizacion (apt-watch), cache de openoffice y papelera.
+# Francisco Rodrigo
+
+cd /home/profesor/
+for i in *
+do
+  if [ -d $i/Desktop ]; then
+     if [ $i != "dpto" ]
+     then
+	rm -rf $i/.thumbnails
+	rm -rf $i/.java/deployment/cache
+	rm -rf $i/.local/share/Trash
+	rm -rf $i/.mozilla/firefox/*.default/Cache/*
+        rm -rf $i/.googleearth/Cache/*
+        rm -rf $i/.cache/google-chrome/*
+        # Si queremos comprimir la base de datos sqlite hacemos lo siguiente (necesita tener instalado sqlite3 en el servidor nfs y en mayhave):        
+      	for f in $i/.mozilla/firefox/*/*.sqlite; do sqlite3 $f 'VACUUM;'; done
+        # Si queremos borrar las bases de datos hacemos esto otro:
+	#rm -rf $i/.mozilla/firefox/*.default/*.sqlite*
+        rm -rf $i/.openoffice.org/3/user/uno_packages/cache
+        rm -rf $i/.openoffice.org/3/user/registry/cache
+        rm -rf $i/.evolution/cache
+        rm -rf $i/.apt-watch
+	#Desbloqueamos firefox por si se queda colgado
+        rm -rf $i/.mozilla/firefox/*.default/lock
+    fi
+  fi
+done
+cd -
+
+cd /home/alumnos/
+for i in *
+do
+	rm -rf $i/.thumbnails
+	rm -rf $i/.java/deployment/cache
+	rm -rf $i/.local/share/Trash
+	rm -rf $i/.mozilla/firefox/*.default/Cache/*
+        rm -rf $i/.googleearth/Cache/*
+        rm -rf $i/.cache/google-chrome/*
+        #for f in $i/.mozilla/firefox/*/*.sqlite; do sqlite3 $f 'VACUUM;'; done
+	rm -rf $i/.mozilla/firefox/*.default/*.sqlite*
+        rm -rf $i/.openoffice.org/3/user/uno_packages/cache
+        rm -rf $i/.openoffice.org/3/user/registry/cache
+        rm -rf $i/.evolution/cache
+        rm -rf $i/.apt-watch
+	#Desbloqueamos firefox por si se queda colgado
+        rm -rf $i/.mozilla/firefox/*.default/lock
+	#Limpiamos la carpeta recibidos del alumno y enviados. De momento no.
+        #rm -rf $i/recibidos_profesor/*
+        #rm -rf $i/enviar_profesor/*
+done
+cd -

Property changes on: scripts/nfs/limpiar_usuarios.sh
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: scripts/nfs/copiar-escritorio-todos-profesores.sh
===================================================================
--- scripts/nfs/copiar-escritorio-todos-profesores.sh	(nonexistent)
+++ scripts/nfs/copiar-escritorio-todos-profesores.sh	(revision 535)
@@ -0,0 +1,22 @@
+#!/bin/bash
+#Para ejecutar en el servidor nfs
+#Copia una serie de ficheros en el escritorio de todos los profesores.
+#Alfonso Pastor. IES Virgen de Guadalupe.
+
+echo "Ficheros a copiar: $*"
+for i in $(ls /home/profesor); do
+    echo "Copiando al escritorio del profesor $i"
+    uid=$(stat -c%u /home/profesor/$i)
+    if test ! -d /home/profesor/$i/Desktop
+    then
+        echo "El usuario $i no tiene escritorio. Creandolo...."
+        mkdir /home/profesor/$i/Desktop
+        chown $uid:$uid /home/profesor/$i/Desktop
+        chmod 2755 /home/profesor/$i/Desktop
+    fi
+    cp -pfR "$*" /home/profesor/$i/Desktop       
+    for fichero in "$*" ; do
+          chown -R $uid:$uid "/home/profesor/$i/Desktop/$fichero"
+    done
+done
+

Property changes on: scripts/nfs/copiar-escritorio-todos-profesores.sh
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: scripts/nfs/copiar-skel-xfce-user.sh
===================================================================
--- scripts/nfs/copiar-skel-xfce-user.sh	(nonexistent)
+++ scripts/nfs/copiar-skel-xfce-user.sh	(revision 535)
@@ -0,0 +1,27 @@
+#!/bin/bash
+
+#Para ejecutar en el servidor nfs
+#Copia un skel ubicado en /root/scripts/skel-xfce sobre el usuario indicado como parametro. Se debe indicar la ruta completa del home.
+#Alfonso Pastor. IES Virgen de Guadalupe.
+
+function copiar_skel() {
+   ruta=$1
+   uid=$(stat -c%u "$ruta")
+   shopt -s dotglob  # Para copiar tambien los archivos ocultos
+   cd /root/scripts/skel-xfce
+   cp -pfR * "$ruta"
+   chown -R $uid:$uid "$ruta"
+   cd -
+   shopt -u dotglob
+}
+
+ruta=$1
+if [ -z $ruta ]
+then
+   echo "Debes indicar la ruta del home a copiar skel"
+else
+
+    echo "Copiando al home $ruta"
+    copiar_skel "$ruta"
+fi
+

Property changes on: scripts/nfs/copiar-skel-xfce-user.sh
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: scripts/ldap/addipfija.sh
===================================================================
--- scripts/ldap/addipfija.sh	(nonexistent)
+++ scripts/ldap/addipfija.sh	(revision 535)
@@ -0,0 +1,57 @@
+#!/bin/bash
+
+#Añade un equipo (impresora, switch, etc) que tendra IP Fija al directorio LDAP, sin añadirlo a ningún
+#grupo de Netgroups.
+#Basado en el script addworkstation.sh de Ricardo Salgado Cid (IESO Galisteo)
+#Alfonso Pastor. IES Virgen de Guadalupe.
+
+if [ $# -ne 3 ]; then
+   echo "Uso: $0 hostname ip mac"
+   exit
+fi
+
+
+dominio=`hostname -d`
+host=$1
+ip=$2
+ip1=`echo $2 | cut -d"." -f1`
+ip2=`echo $2 | cut -d"." -f2`
+ip3=`echo $2 | cut -d"." -f3`
+ip4=`echo $2 | cut -d"." -f4`
+mac=`echo $3 |tr '[:lower:]' '[:upper:]'`
+
+FICHERO=$host.$dominio.ldif
+if [ -e $FICHERO ]; then
+  rm $FICHERO
+fi
+
+echo "
+dn: dc=$ip4,dc=$ip3,dc=$ip2,dc=$ip1,dc=in-addr,dc=arpa,ou=hosts,dc=instituto,dc=extremadura,dc=es
+changetype: add
+objectclass: dnsdomain2
+objectclass: domainrelatedobject
+dc: $ip4
+associateddomain: $ip4.$ip3.$ip2.$ip1.in-addr.arpa
+PTRRecord: $host.$dominio
+
+dn: dc=$host,dc=$dominio,ou=hosts,dc=instituto,dc=extremadura,dc=es
+changetype: add
+objectclass: dnsdomain2
+objectclass: domainrelatedobject
+dc: $host
+associateddomain: $host.$dominio
+ARecord: $ip
+
+dn: cn=$host,cn=group1,cn=INTERNAL,cn=DHCP Config,dc=instituto,dc=extremadura,dc=es
+changetype: add
+cn: $host
+objectClass: top
+objectClass: dhcpHost
+dhcpHWAddress: ethernet $mac
+dhcpStatements: fixed-address $host
+" > $FICHERO
+
+echo "Añadiendo $host.$dominio a ldap con ip=$ip y mac=$mac"
+
+ldapadd -c -x -h ldap  -W  -D "cn=admin,ou=People,dc=instituto,dc=extremadura,dc=es" -f $FICHERO 
+

Property changes on: scripts/ldap/addipfija.sh
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: scripts/ldap/genexpal_profes.sh
===================================================================
--- scripts/ldap/genexpal_profes.sh	(nonexistent)
+++ scripts/ldap/genexpal_profes.sh	(revision 535)
@@ -0,0 +1,80 @@
+#!/bin/sh
+
+# Tiene de entrada un fichero de profesores descargado de Rayuela. Elimina de �l los 
+# profesores ya dados de alta en Rayuela, de manera que quedan solamente los nuevos.
+# Este script debe estar en el mismo directorio que el archivo .xml de exportacion
+# de profes de Rayuela mas reciente (bueno, cualquiera vale, pero lo suyo es tener
+# los profes al dia).
+# Funcionamiento : genexpal_profes.sh Exportacion_Datos_Profes_Mas_Reciente.xml
+
+if [ -f ./Profes_Nuevos.xml ]; then
+  rm -f ./Profes_Nuevos.xml
+fi
+
+clear
+
+if [ $# -lt 1 ]; then
+  echo
+  echo Funcionamiento : genexpal_profes.sh Exportacion_Datos_Profes_Mas_Reciente.xml
+  ls -lh
+  exit 1
+fi
+
+if [ ! -f $1 ]; then
+  echo
+  echo Funcionamiento : genexpal_profes.sh Exportacion_Datos_Profes_Mas_Reciente.xml
+  echo Y ademas tiene que existir $1.
+  ls -lh
+  exit 1
+fi
+
+# Sacamos los nie para no hacer grep sobre un fichero tan gordo todo el tiempo
+ldapsearch  -xLLL -h ldap -b "ou=People,dc=instituto,dc=extremadura,dc=es" homeDirectory employeeNumber | tr '\n' ' ' | sed 's/dc=es/dc=es\n/g' | grep profesor | cut -d" " -f5 | grep -v "dn:" > dnis
+
+# Estas tonter�as son para el porcentaje
+total_lineas=`wc -l ./$1 | cut -d" " -f1`
+lineas=1
+
+# Variable de guarda, para saber cu�ndo copiar
+copiar=si
+
+clear
+
+echo Empezamos, esto va a tardar un ratillo...
+
+while [ $lineas -le $total_lineas ]
+do
+  linea=`head -$lineas ./$1 | tail -1`
+  etiqueta=`echo $linea | tr '<' '>' | cut -d">" -f2`
+
+  tpc=`expr $lineas \* 100 / $total_lineas`
+  echo -n "Procesando l�nea $lineas...$tpc% completado..."
+  echo -ne "\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b"
+  lineas=`expr $lineas + 1`
+
+  if [ "$etiqueta" = "dni" ]; then
+    valor_dni=`echo $linea | tr '<' '>' | cut -d">" -f3`
+    if [ "`grep -c "$valor_dni" dnis`" != "0" ]; then
+      copiar=no
+      else
+      copiar=si
+      echo "<profesor>" >>  Profes_Nuevos.xml
+    fi
+  fi
+
+  if [ "$copiar" = "si" -a "$etiqueta" != "profesor" ]; then
+    echo "$linea" >> Profes_Nuevos.xml
+  fi
+
+  if [ "$copiar" = "no" -a "$etiqueta" = "/profesor" ]; then
+    copiar=si
+  fi
+
+done
+
+rm -f dnis
+
+echo
+echo Exportacion generada : Profes_Nuevos.xml
+echo Contiene `grep -c "<profesor>" Profes_Nuevos.xml` nuevos profes para incluir.
+

Property changes on: scripts/ldap/genexpal_profes.sh
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: scripts/ldap/limpiar-cache-squid.sh
===================================================================
--- scripts/ldap/limpiar-cache-squid.sh	(nonexistent)
+++ scripts/ldap/limpiar-cache-squid.sh	(revision 535)
@@ -0,0 +1,11 @@
+#!/bin/bash
+#Ejecutar en el servidor ldap. Limpia la caché del squid y lo reinicia.
+#Alfonso Pastor. IES Virgen de Guadalupe.
+cd /var/spool
+/etc/init.d/squid stop
+rm -Rf squid
+mkdir squid
+chown proxy:proxy squid
+chmod 750 squid
+/etc/init.d/squid start
+

Property changes on: scripts/ldap/limpiar-cache-squid.sh
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: scripts/ldap/delhost-workstation.sh
===================================================================
--- scripts/ldap/delhost-workstation.sh	(nonexistent)
+++ scripts/ldap/delhost-workstation.sh	(revision 535)
@@ -0,0 +1,73 @@
+#!/bin/bash
+
+#Borra un host del directorio LDAP
+#Ricardo Salgado Cid
+#IESO Galisteo
+#
+#20/03/11 Release incial ()
+
+if [ $# -ne 1 ]; then
+   echo "Uso: $0 hostname"
+   exit
+fi
+
+
+dominio=`hostname -d`
+host=$1
+dn=$(ldapsearch -xLLL -h ldap -b cn="DHCP Config",dc=instituto,dc=extremadura,dc=es "(&(objectClass=dhcpHost)(cn=$host))" dn | perl -p0e 's/\n //g')
+
+if [ ! "$dn" ] ; then
+   echo "No hay ningun equipo llamado $host"
+   exit 1
+fi
+
+ip=$(ldapsearch -xLLL -h ldap -b dc="$dominio",ou="hosts",dc=instituto,dc=extremadura,dc=es "(&(|(objectClass=dNSDomain2)(objectClass=dNSDomain))(dc=$host))" | grep aRecord: | cut -d" " -f2)
+
+ip1=$(echo $ip | cut -d"." -f1)
+ip2=$(echo $ip | cut -d"." -f2)
+ip3=$(echo $ip | cut -d"." -f3)
+ip4=$(echo $ip | cut -d"." -f4)
+
+FICHERO=$host.$dominio.ldif
+if [ -e $FICHERO ]; then
+  rm $FICHERO
+fi
+
+echo "
+dn: dc=$ip4,dc=$ip3,dc=$ip2,dc=$ip1,dc=in-addr,dc=arpa,ou=hosts,dc=instituto,dc=extremadura,dc=es
+changetype: delete
+
+dn: dc=$host,dc=$dominio,ou=hosts,dc=instituto,dc=extremadura,dc=es
+changetype: delete
+
+dn: cn=$host,cn=group1,cn=INTERNAL,cn=DHCP Config,dc=instituto,dc=extremadura,dc=es
+changetype: delete
+
+" > $FICHERO
+
+echo "dn: cn=workstation-hosts, ou=Netgroup,dc=instituto,dc=extremadura,dc=es
+changetype: modify" >> $FICHERO
+echo "replace: nisNetgroupTriple" >> $FICHERO
+ldapsearch -xLLL -h ldap -b ou=Netgroup,dc=instituto,dc=extremadura,dc=es "(cn=workstation-hosts)" | grep nisNetgroupTriple | grep -v "nisNetgroupTriple: ($host," |  while read triple
+do
+  echo $triple >> $FICHERO 
+done
+
+echo "Borrando $host.$dominio de ldap con ip=$ip"
+
+ldapadd -c -x -H ldaps://ldap.$dominio  -W  -D "cn=admin,ou=People,dc=instituto,dc=extremadura,dc=es" -f $FICHERO 
+
+
+read -p "Intentar borrar tambien los restos en puppet (s/n)?"
+   if [ $REPLY != "s" ]; then
+      exit 1
+   fi
+
+if [ "$(hostname)" = "servidor" ]; then
+  puppetca --clean $host.$dominio; rm /var/lib/puppet/yaml/facts/$host.$dominio.yaml; rm /var/lib/puppet/yaml/node/$host.$dominio.yaml
+else
+  echo "Es necesaria la contrseña de root del servidor nfs"
+  ssh root@servidor "puppetca --clean $host.$dominio; rm /var/lib/puppet/yaml/facts/$host.$dominio.yaml; rm /var/lib/puppet/yaml/node/$host.$dominio.yaml" 
+fi 
+
+

Property changes on: scripts/ldap/delhost-workstation.sh
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: scripts/ldap/restauraldap.sh
===================================================================
--- scripts/ldap/restauraldap.sh	(nonexistent)
+++ scripts/ldap/restauraldap.sh	(revision 535)
@@ -0,0 +1,30 @@
+#!/bin/bash
+
+#Ejecutar en el servidor ldap. Restaura el árbol ldap completo de una copia previa del ldip.
+#Complementario a copialdap.sh
+#Alfonso Pastor. IES Virgen de Guadalupe.
+
+if [ "$1" == "" ]
+then
+   echo "Debe indicar como parametro el fichero ldif".
+   exit 1
+fi
+
+if [ ! -e  $1 ]
+then
+   echo "El fichero $1 no existe"
+   exit 1
+fi
+
+
+echo "Restaurando ldap desde $1"
+
+/etc/init.d/slapd stop
+
+rm /var/lib/ldap/*
+
+slapadd -l $1
+
+chown -R openldap:openldap /var/lib/ldap/
+
+/etc/init.d/slapd start

Property changes on: scripts/ldap/restauraldap.sh
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: scripts/ldap/copialdap.sh
===================================================================
--- scripts/ldap/copialdap.sh	(nonexistent)
+++ scripts/ldap/copialdap.sh	(revision 535)
@@ -0,0 +1,11 @@
+#!/bin/bash
+#Ejecutar en el servidor ldap. Hace copia de seguridad del arbol ldap en la ruta "/root/scripts/"
+#Alfonso Pastor. IES Virgen de Guadalupe.
+/etc/init.d/slapd stop
+fecha=$(date +%F )
+copia="/root/scripts/copia-seguridad-ldap-$fecha.ldif"
+slapcat > $copia
+/etc/init.d/slapd start
+echo "Copiado en $copia".
+
+

Property changes on: scripts/ldap/copialdap.sh
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: scripts/ldap/genexpal.sh
===================================================================
--- scripts/ldap/genexpal.sh	(nonexistent)
+++ scripts/ldap/genexpal.sh	(revision 535)
@@ -0,0 +1,116 @@
+#!/bin/sh
+
+# Tiene de entrada un fichero de alumnos descargado de rayuela. Elimina de dicho fichero
+# los alumnos que ya est�n en ldap, de tal manera que quedan solamente los nuevos alumnos.
+# Este script debe estar en el mismo directorio que el archivo .zip de exportacion
+# de alumnos de Rayuela mas reciente (bueno, cualquiera vale, pero lo suyo es tener
+# los alumnos al dia).
+# Funcionamiento : genexpal.sh Exportacion_Mas_Reciente.zip
+
+
+rm -f Alumnos_nuevos.xml
+rm -r ./NuevaExportacion
+
+clear
+
+echo -n "Contraseña de administrador de la BBDD ldap:"
+read pwd
+
+
+if [ $# -lt 1 ]; then
+  echo
+  echo Funcionamiento : genexpal.sh Exportacion_Mas_Reciente.zip
+  ls -lh
+  exit 1
+fi
+
+if [ ! -f $1 ]; then
+  echo
+  echo Funcionamiento : genexpal.sh Exportacion_Mas_Reciente.zip
+  echo Y ademas tiene que existir $1.
+  ls -lh
+  exit 1
+fi
+
+error=`unzip -t $1 | grep "No errors detected"`
+
+if [ "$error" = "" ]; then
+  echo
+  echo Errores en fichero comprimido $1, abortando...
+  exit 1
+fi
+
+unzip -o $1 -d ./NuevaExportacion/
+
+# Sacamos los nie para no hacer grep sobre un fichero tan gordo todo el tiempo
+ldapsearch  -w $pwd -xLLL -h ldap -b "ou=People,dc=instituto,dc=extremadura,dc=es" homeDirectory| tr '\n' ' ' | sed 's/dc=es/dc=es\n/g' | grep alumnos | tr '/' ' '| cut -d" " -f6 > estudiantes
+#ldapsearch  -w $pwd -xLLL -h ldap -b "cn=students,ou=Group,dc=instituto,dc=extremadura,dc=es" member | tr '=,' ' ' | cut -d" " -f3 > estudiantes
+
+while read ident
+do
+  ldapsearch  -w $pwd -xLLL -h ldap -b "uid=$ident,ou=People,dc=instituto,dc=extremadura,dc=es" employeeNumber | grep employeeNumber | cut -d" " -f2 >> nies_existentes
+done < estudiantes
+
+
+# Estas tonter�as son para el porcentaje
+total_lineas=`wc -l ./NuevaExportacion/Alumnos.xml | cut -d" " -f1`
+lineas=1
+
+# Variable de guarda, para saber cu�ndo copiar
+copiar=si
+
+clear
+
+echo Empezamos, esto va a tardar un ratillo...
+
+while [ $lineas -le $total_lineas ]
+do
+  linea=`head -$lineas ./NuevaExportacion/Alumnos.xml | tail -1`
+  etiqueta=`echo $linea | tr '<' '>' | cut -d">" -f2`
+
+  tpc=`expr $lineas \* 100 / $total_lineas`
+  echo -n "Procesando l�nea $lineas...$tpc% completado..."
+  echo -ne "\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b"
+  lineas=`expr $lineas + 1`
+
+  if [ "$etiqueta" = "nie" ]; then
+    valor_nies=`echo $linea | tr '<' '>' | cut -d">" -f3`
+    if [ "`grep -c "$valor_nies" nies_existentes`" != "0" ]; then
+      copiar=no
+      else
+      copiar=si
+      echo "<alumno>" >> Alumnos_nuevos.xml
+    fi
+  fi
+
+  if [ "$copiar" = "si" -a "$etiqueta" != "alumno" ]; then
+    echo "$linea" >> Alumnos_nuevos.xml
+  fi
+
+  if [ "$copiar" = "no" -a "$etiqueta" = "nombre-fichero" ]; then
+    fichero_foto=`echo $linea | tr '<' '>' | cut -d">" -f3`
+    rm -f ./NuevaExportacion/$fichero_foto
+  fi
+
+  if [ "$copiar" = "no" -a "$etiqueta" = "/alumno" ]; then
+    copiar=si
+  fi
+
+done
+
+rm -f nies_existentes
+#iconv -t ISO_8859-1//TRANSLIT Alumnos_nuevos.xml -o ./NuevaExportacion/Alumnos.xml
+cp -f Alumnos_nuevos.xml ./NuevaExportacion/Alumnos.xml
+rm -f Alumnos.xml
+rm -f estudiantes
+
+cd ./NuevaExportacion
+nuevaexp="NuevaExportacionAlumnos`date +%y%m%d`"
+zip ../$nuevaexp *
+cd ..
+rm -r ./NuevaExportacion
+echo
+echo Exportacion generada : $nuevaexp.zip
+echo Contiene `grep -c "<alumno>" Alumnos_nuevos.xml` nuevos alumnos para incluir.
+rm -f Alumnos_nuevos.xml
+

Property changes on: scripts/ldap/genexpal.sh
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: scripts/ldap/renhost-workstation.sh
===================================================================
--- scripts/ldap/renhost-workstation.sh	(nonexistent)
+++ scripts/ldap/renhost-workstation.sh	(revision 535)
@@ -0,0 +1,126 @@
+#!/bin/bash
+
+#Modifica el nombre de un equipo en LDAP
+#Ricardo Salgado Cid
+#IESO Galisteo
+#
+#20/03/12 Adaptado a ldaps 
+#07/10/10 Modificacion para que funcione adecuadamente con los host con los que se uso lwat
+#17/09/10 Release incial ()
+
+
+PASSWORDLDAP=""
+#Usa el valor de esta variable como password de ldap en vez de pedirla en cada ocasión.
+#Ojo!, utilizar con cuidado
+
+if [ $# -ne 2 ]; then
+   echo "Uso: $0 nombre_actual nuevo_nombre"
+   exit
+fi
+
+dominio=`hostname -d`
+nactual=$1
+nnuevo=$2
+
+FICHERO=$nnuevo.$dominio.ldif
+if [ -e $FICHERO ]; then
+  rm $FICHERO
+fi
+
+dnactual=$(ldapsearch -xLLL -h ldap -b cn="DHCP Config",dc=instituto,dc=extremadura,dc=es "(&(objectClass=dhcpHost)(cn=$nactual))" dn | perl -p0e 's/\n //g' )
+
+
+if [ ! "$dnactual" ] ; then
+   echo "No hay ningun equipo llamado $nactual"
+   exit 1
+fi
+
+if ldapsearch -xLLL -h ldap -b cn="DHCP Config",dc=instituto,dc=extremadura,dc=es "(&(objectClass=dhcpHost)(cn=$nnuevo))" dn | perl -p0e 's/\n //g' > /dev/null ; then
+   echo "Ya existe un equipo con el nombre $nnuevo"
+   exit 1
+fi
+
+
+dnnuevo=$(echo $dnactual |  sed "s/$nactual/$nnuevo/" )
+
+ip=$(ldapsearch -xLLL -h ldap -b dc="$dominio",ou="hosts",dc=instituto,dc=extremadura,dc=es "(&(|(objectClass=dNSDomain2)(objectClass=dNSDomain))(dc=$nactual))" | grep aRecord: | cut -d" " -f2)
+ip1=$(echo $ip | cut -d"." -f1)
+ip2=$(echo $ip | cut -d"." -f2)
+ip3=$(echo $ip | cut -d"." -f3)
+ip4=$(echo $ip | cut -d"." -f4)
+
+echo "$dnactual
+changetype: moddn
+newrdn: cn=$nnuevo
+deleteoldrdn: 1
+
+$dnnuevo
+changetype: modify
+delete: dhcpStatements
+
+$dnnuevo
+changetype: modify
+add: dhcpStatements
+dhcpStatements: fixed-address $nnuevo
+
+dn: dc=$nactual,dc=$dominio,ou=hosts,dc=instituto,dc=extremadura,dc=es
+changetype: moddn
+newrdn: dc=$nnuevo
+deleteoldrdn: 1
+
+dn: dc=$nnuevo,dc=$dominio,ou=hosts,dc=instituto,dc=extremadura,dc=es
+changetype: modify
+replace: associatedDomain
+associatedDomain: $nnuevo.$dominio
+
+dn: dc=$ip4,dc=$ip3,dc=$ip2,dc=$ip1,dc=in-addr,dc=arpa,ou=hosts,dc=instituto,dc=extremadura,dc=es
+changetype: modify
+replace: pTRRecord
+pTRRecord: $nnuevo.$dominio
+
+"  > $FICHERO
+
+#Comprobar si el host tiene la entrada extra que añade lwat
+#y en ese caso modificarla tambien
+entradalwat=$(ldapsearch -xLLL -h ldap -b ou="hosts",dc=instituto,dc=extremadura,dc=es "(&(objectClass=ipHost)(cn=$nactual))" dn | perl -p0e 's/\n //g')
+
+if [ "$entradalwat" ]; then 
+echo "$entradalwat
+changetype: moddn
+newrdn: cn=$nnuevo
+deleteoldrdn: 1
+">> $FICHERO
+
+fi
+
+
+
+echo "dn: cn=workstation-hosts, ou=Netgroup,dc=instituto,dc=extremadura,dc=es
+changetype: modify
+replace: nisNetgroupTriple" >> $FICHERO
+
+ldapsearch -xLLL -h ldap -b ou=Netgroup,dc=instituto,dc=extremadura,dc=es "(cn=workstation-hosts)" | grep nisNetgroupTriple | grep -v "nisNetgroupTriple: ($nactual," |  while read triple
+do
+    echo $triple >> $FICHERO
+done
+
+echo "nisNetgroupTriple: ($nnuevo,-,-)" >> $FICHERO
+if [ "$PASSWORDLDAP" ]; then
+   ldapmodify -c -x -H ldaps://ldap.$dominio  -w$PASSWORDLDAP  -D "cn=admin,ou=People,dc=instituto,dc=extremadura,dc=es" -f $FICHERO
+else
+   ldapmodify -c -x -H ldaps://ldap.$dominio  -W  -D "cn=admin,ou=People,dc=instituto,dc=extremadura,dc=es" -f $FICHERO 
+fi
+
+
+read -p "Intentar eliminar los restos del normbre antiguo en puppet (s/n)?"
+   if [ $REPLY != "s" ]; then
+      exit 1
+   fi
+host=$nactual
+if [ "$(hostname)" = "servidor" ]; then
+  puppetca --clean $host.$dominio; rm /var/lib/puppet/yaml/facts/$host.$dominio.yaml; rm /var/lib/puppet/yaml/node/$host.$dominio.yaml
+else
+  echo "Es necesaria la contrseña de root del servidor nfs"
+  ssh root@servidor "puppetca --clean $host.$dominio; rm /var/lib/puppet/yaml/facts/$host.$dominio.yaml; rm /var/lib/puppet/yaml/node/$host.$dominio.yaml"
+fi
+

Property changes on: scripts/ldap/renhost-workstation.sh
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: scripts/ldap/addhost-workstation.sh
===================================================================
--- scripts/ldap/addhost-workstation.sh	(nonexistent)
+++ scripts/ldap/addhost-workstation.sh	(revision 535)
@@ -0,0 +1,83 @@
+#!/bin/bash
+
+#Añade un host al directorio LDAP
+#Ricardo Salgado Cid
+#IESO Galisteo
+#
+#21/03/11 Corregido bug en la comprobacion de si el equipos existe en el Netgroup
+#	  Adaptado para funcionar con ldaps
+#	  Ya no es necesario el hack para modificar el Netgroup
+#23/09/09 Corregido problema de compatibilidad con ldap-utils 2.4.x
+#24/03/09 Release incial ()
+
+
+PASSWORDLDAP=""
+#Usa el valor de esta variable como password de ldap en vez de pedirla en cada ocasión.
+#Ojo!, utilizar con cuidado
+
+
+if [ $# -ne 3 ]; then
+   echo "Uso: $0 hostname ip mac"
+   exit
+fi
+
+
+dominio=`hostname -d`
+host=$1
+ip=$2
+ip1=$(echo $ip | cut -d"." -f1)
+ip2=$(echo $ip | cut -d"." -f2)
+ip3=$(echo $ip | cut -d"." -f3)
+ip4=$(echo $ip | cut -d"." -f4)
+mac=$(echo $3 |tr '[:lower:]' '[:upper:]')
+
+FICHERO=$host.$dominio.ldif
+if [ -e $FICHERO ]; then
+  rm $FICHERO
+fi
+
+echo "
+dn: dc=$ip4,dc=$ip3,dc=$ip2,dc=$ip1,dc=in-addr,dc=arpa,ou=hosts,dc=instituto,dc=extremadura,dc=es
+changetype: add
+objectclass: dnsdomain2
+objectclass: domainrelatedobject
+dc: $ip4
+associateddomain: $ip4.$ip3.$ip2.$ip1.in-addr.arpa
+PTRRecord: $host.$dominio
+
+dn: dc=$host,dc=$dominio,ou=hosts,dc=instituto,dc=extremadura,dc=es
+changetype: add
+objectclass: dnsdomain2
+objectclass: domainrelatedobject
+dc: $host
+associateddomain: $host.$dominio
+ARecord: $ip
+
+dn: cn=$host,cn=group1,cn=INTERNAL,cn=DHCP Config,dc=instituto,dc=extremadura,dc=es
+changetype: add
+cn: $host
+objectClass: top
+objectClass: dhcpHost
+dhcpHWAddress: ethernet $mac
+dhcpStatements: fixed-address $host
+
+" > $FICHERO
+
+echo "dn: cn=workstation-hosts, ou=Netgroup,dc=instituto,dc=extremadura,dc=es
+changetype: modify" >> $FICHERO
+echo "replace: nisNetgroupTriple" >> $FICHERO
+ldapsearch -xLLL -h ldap -b ou=Netgroup,dc=instituto,dc=extremadura,dc=es "(cn=workstation-hosts)" | grep nisNetgroupTriple |  grep -v "nisNetgroupTriple: ($host," | while read triple
+do
+  echo $triple >> $FICHERO 
+done
+
+echo "nisNetgroupTriple: ($host,-,-)" >> $FICHERO
+
+echo "Añadiendo $host.$dominio a ldap con ip=$ip y mac=$mac"
+
+if [ "$PASSWORDLDAP" ]; then
+   ldapmodify -c -x -H ldaps://ldap.$dominio  -w$PASSWORDLDAP  -D "cn=admin,ou=People,dc=instituto,dc=extremadura,dc=es" -f $FICHERO
+else
+   ldapmodify -c -x -H ldaps://ldap.$dominio  -W  -D "cn=admin,ou=People,dc=instituto,dc=extremadura,dc=es" -f $FICHERO
+fi
+

Property changes on: scripts/ldap/addhost-workstation.sh
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: scripts/ldap/limpiarGrupos.php
===================================================================
--- scripts/ldap/limpiarGrupos.php	(nonexistent)
+++ scripts/ldap/limpiarGrupos.php	(revision 535)
@@ -0,0 +1,98 @@
+<?
+# Descripción del Script:
+# Este script borra de los grupos (clases, departamentos, alumnos y profesores) todas las referencias 
+# a individuos (members y membersUID) que no existan en LDAP
+# Se instala en /var/www del servidor ldap.
+# Se llama desde el navegador abriendo http://ldap/limpiarGrupos.php
+# Script realizado por:
+# - Manuel Mora Gordillo
+# - Francisco Méndez Palma
+# I.E.S. Santa Eulalia. Mérida
+# Septiembre 2009
+
+$host       = "localhost";	// Aquí debes poner la ip de tu servidor LDAP
+$puerto     = 389;
+
+$admin="cn=admin,ou=People,dc=instituto,dc=extremadura,dc=es";
+$passwd="";	   // Aquí debes poner tu password
+
+
+$conex=ldap_connect($host,$puerto) or die ("No ha sido posible conectarse al servidor");
+  
+if (!ldap_set_option($conex, LDAP_OPT_PROTOCOL_VERSION, 3)){
+   echo "Falló la configuracion de protocolo version 3";
+	 die();
+}
+
+if ($conex){
+   $r=ldap_bind($conex, $admin, $passwd);
+   
+   if (!$r){
+			echo "Upsss, error. Vuelve a intentarlo otra vez.";
+			die();
+   }
+}
+
+
+// Obtenemos un listado de todas los individuos que hay en el nodo "People"
+
+$dn = "ou=People,dc=instituto,dc=extremadura,dc=es";
+$filtro="uid=*";
+
+$solonecesito = array("uid");
+$sr=ldap_search($conex, $dn, $filtro,$solonecesito);
+$info = ldap_get_entries($conex, $sr);
+
+$individuosUID = array();
+$individuos = array();
+
+for($i=0;$i<count($info);$i++){
+	$individuosUID[] = $info[$i]["uid"][0];
+	$individuos[] = "uid=".$info[$i]["uid"][0].",ou=People,dc=instituto,dc=extremadura,dc=es";
+}
+
+// Obtenemos todos los grupos (clases, departamentos, alumnos y profesores) 
+// y revisamos si sus "members" existen, sino lo borramos
+
+$dn = "ou=Group,dc=instituto,dc=extremadura,dc=es";
+$filtro="cn=*";
+$solonecesito = array("cn","grouptype","member","memberuid");
+$sr=ldap_search($conex, $dn, $filtro,$solonecesito);
+$info = ldap_get_entries($conex, $sr);
+
+for($i=0;$i<count($info);$i++){
+
+	if($info[$i]["grouptype"][0]=="school_class" ||
+	   $info[$i]["grouptype"][0]=="school_department" ||
+	   $info[$i]["grouptype"][0]=="authority_group"){
+
+		for($j=0;$j<count($info[$i]["member"]);$j++){
+
+			if(trim($info[$i]["member"][$j])!="" && !in_array($info[$i]["member"][$j],$individuos)){
+
+				echo "Grupo <b>".$info[$i]["cn"][0]."</b>: el individuo <b>".$info[$i]["member"][$j]."</b> no existe en 'People', lo eliminamos del grupo.<br>";
+
+				$tmp = array();
+				$tmp["member"][0]=$info[$i]["member"][$j];
+
+				@ldap_mod_del($conex,"cn=".$info[$i]["cn"][0].",ou=Group,dc=instituto,dc=extremadura,dc=es",$tmp);
+			}
+		}
+		for($j=0;$j<count($info[$i]["memberuid"]);$j++){
+
+			if(trim($info[$i]["memberuid"][$j])!="" && !in_array($info[$i]["memberuid"][$j],$individuosUID)){
+
+				echo "Grupo <b>".$info[$i]["cn"][0]."</b>: el individuo <b>".$info[$i]["memberuid"][$j]."</b> no existe en 'People', procedemos a eliminarlo del grupo.<br>";
+
+				$tmp = array();
+				$tmp["memberuid"][0]=$info[$i]["memberuid"][$j];
+
+				@ldap_mod_del($conex,"cn=".$info[$i]["cn"][0].",ou=Group,dc=instituto,dc=extremadura,dc=es",$tmp);
+			}
+		}
+	}
+}
+
+echo "<br><br><br><b>Nota: Los grupos obligatoriamente deben tener al menos un miembro, si el individuo a borrar es el unico del grupo, no se borrara.</b>";
+
+?>
Index: scripts/ldap/alumnos-sin-foto.sh
===================================================================
--- scripts/ldap/alumnos-sin-foto.sh	(nonexistent)
+++ scripts/ldap/alumnos-sin-foto.sh	(revision 535)
@@ -0,0 +1,5 @@
+#!/bin/sh
+#Lista los alumnos que hay sin foto en ldap.
+
+ldapsearch  -xLLL -h ldap -b "ou=People,dc=instituto,dc=extremadura,dc=es" "(&(objectClass=inetOrgPerson)(!(jpegPhoto=*)))" "homeDirectory"  | grep "/home/alumnos" | cut -d"/" -f4
+

Property changes on: scripts/ldap/alumnos-sin-foto.sh
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: scripts/puestos/regenera_grub.sh
===================================================================
--- scripts/puestos/regenera_grub.sh	(nonexistent)
+++ scripts/puestos/regenera_grub.sh	(revision 535)
@@ -0,0 +1,41 @@
+#!/bin/bash
+#Para ser ejecutado como root
+#Regenera el grub de un equipo que no arranca. Se ejecuta desde un disco de rescate (SystemRescueCD, Clonezilla, etc).
+#Alojarlo en el servidor nfs en /var/www/ficheros. 
+#Bajarlo con wget http://servidor/ficheros/regenera_grub.sh
+#Hacerlo ejecutable chmod +x regenera_grub.sh
+#Ejecutarlo con los parametros 
+#        $1 =  ruta a la particion con Linux. Ej /dev/sda1
+#        $2 =  ruta al disco donde va el grub. Ej /dev/sda
+#Alfonso Pastor. IES Virgen de Guadalupe.
+
+if [ $# -ne 2 ]
+then
+   echo "Ejemplo uso:  $0  /dev/sda1  /dev/sda"
+   echo "Siendo /dev/sda1 la partición raiz con Linux y /dev/sda el disco donde instalar Grub"
+   echo "Las particiones se listan con fdisk -l"
+   exit  1
+fi
+
+particion=$1
+disco=$2
+
+echo "Montando particiones..."
+mount $particion  /mnt
+mount --bind /dev /mnt/dev
+mount --bind /dev/pts /mnt/dev/pts
+mount --bind /proc /mnt/proc
+mount --bind /sys /mnt/sys
+
+echo "Regenerando grub...."
+chroot /mnt /usr/sbin/grub-install --recheck $disco
+chroot /mnt /usr/sbin/update-grub2
+
+echo "Desmontando particiones"
+umount /mnt/dev/pts
+umount /mnt/dev
+umount /mnt/proc
+umount /mnt/sys
+umount /mnt
+
+echo "Fin"
Index: scripts/puestos/mintldap/nscd.conf
===================================================================
--- scripts/puestos/mintldap/nscd.conf	(nonexistent)
+++ scripts/puestos/mintldap/nscd.conf	(revision 535)
@@ -0,0 +1,81 @@
+#
+# /etc/nscd.conf
+#
+# An example Name Service Cache config file.  This file is needed by nscd.
+#
+# Legal entries are:
+#
+#	logfile			<file>
+#	debug-level		<level>
+#	threads			<initial #threads to use>
+#	max-threads		<maximum #threads to use>
+#	server-user             <user to run server as instead of root>
+#		server-user is ignored if nscd is started with -S parameters
+#       stat-user               <user who is allowed to request statistics>
+#	reload-count		unlimited|<number>
+#	paranoia		<yes|no>
+#	restart-interval	<time in seconds>
+#
+#       enable-cache		<service> <yes|no>
+#	positive-time-to-live	<service> <time in seconds>
+#	negative-time-to-live   <service> <time in seconds>
+#       suggested-size		<service> <prime number>
+#	check-files		<service> <yes|no>
+#	persistent		<service> <yes|no>
+#	shared			<service> <yes|no>
+#	max-db-size		<service> <number bytes>
+#	auto-propagate		<service> <yes|no>
+#
+# Currently supported cache names (services): passwd, group, hosts, services
+#
+
+
+#	logfile			/var/log/nscd.log
+#	threads			6
+#	max-threads		128
+#	server-user		nobody
+#	stat-user		somebody
+	debug-level		0
+#	reload-count		5
+	paranoia		no
+#	restart-interval	3600
+
+	enable-cache		passwd		yes
+	positive-time-to-live	passwd		600
+	negative-time-to-live	passwd		20
+	suggested-size		passwd		211
+	check-files		passwd		yes
+	persistent		passwd		yes
+	shared			passwd		yes
+	max-db-size		passwd		33554432
+	auto-propagate		passwd		yes
+
+	enable-cache		group		no
+	positive-time-to-live	group		3600
+	negative-time-to-live	group		60
+	suggested-size		group		211
+	check-files		group		yes
+	persistent		group		yes
+	shared			group		yes
+	max-db-size		group		33554432
+	auto-propagate		group		yes
+
+# hosts caching is broken with gethostby* calls, hence is now disabled
+# per default.  See /usr/share/doc/nscd/NEWS.Debian.
+	enable-cache		hosts		no
+	positive-time-to-live	hosts		3600
+	negative-time-to-live	hosts		20
+	suggested-size		hosts		211
+	check-files		hosts		yes
+	persistent		hosts		yes
+	shared			hosts		yes
+	max-db-size		hosts		33554432
+
+	enable-cache		services	yes
+	positive-time-to-live	services	28800
+	negative-time-to-live	services	20
+	suggested-size		services	211
+	check-files		services	yes
+	persistent		services	yes
+	shared			services	yes
+	max-db-size		services	33554432
Index: scripts/puestos/mintldap/ldap/common-auth.bak
===================================================================
--- scripts/puestos/mintldap/ldap/common-auth.bak	(nonexistent)
+++ scripts/puestos/mintldap/ldap/common-auth.bak	(revision 535)
@@ -0,0 +1,10 @@
+#
+# /etc/pam.d/common-auth - authentication settings common to all services
+#
+# This file is included from other service-specific PAM config files,
+# and should contain a list of the authentication modules that define
+# the central authentication scheme for use on the system
+# (e.g., /etc/shadow, LDAP, Kerberos, etc.).  The default is to use the
+# traditional Unix authentication mechanisms.
+#
+auth	required	pam_unix.so nullok_secure
Index: scripts/puestos/mintldap/ldap/ldap.conf
===================================================================
--- scripts/puestos/mintldap/ldap/ldap.conf	(nonexistent)
+++ scripts/puestos/mintldap/ldap/ldap.conf	(revision 535)
@@ -0,0 +1,18 @@
+# $OpenLDAP: pkg/ldap/libraries/libldap/ldap.conf,v 1.9 2000/09/04 19:57:01 kurt Exp $
+BASE	dc=instituto,dc=extremadura,dc=es
+#
+# LDAP Defaults
+#
+
+# See ldap.conf(5) for details
+# This file should be world readable but not world writable.
+
+#BASE	dc=example, dc=com
+#URI	ldap://ldap.example.com ldap://ldap-master.example.com:666
+#SIZELIMIT	12
+#TIMELIMIT	15
+#DEREF		never
+HOST ldap
+TLS_REQCERT never
+TLS_CACERT /etc/ldap/ssl/ldap-server-pubkey.pem
+
Index: scripts/puestos/mintldap/ldap/common-password.bak
===================================================================
--- scripts/puestos/mintldap/ldap/common-password.bak	(nonexistent)
+++ scripts/puestos/mintldap/ldap/common-password.bak	(revision 535)
@@ -0,0 +1,27 @@
+#
+# /etc/pam.d/common-password - password-related modules common to all services
+#
+# This file is included from other service-specific PAM config files,
+# and should contain a list of modules that define  the services to be
+#used to change user passwords.  The default is pam_unix
+
+# The "nullok" option allows users to change an empty password, else
+# empty passwords are treated as locked accounts.
+#
+# (Add `md5' after the module name to enable MD5 passwords)
+#
+# The "obscure" option replaces the old `OBSCURE_CHECKS_ENAB' option in
+# login.defs. Also the "min" and "max" options enforce the length of the
+# new password.
+
+password   required   pam_unix.so nullok obscure min=4 max=8 md5
+
+# Alternate strength checking for password. Note that this
+# requires the libpam-cracklib package to be installed.
+# You will need to comment out the password line above and
+# uncomment the next two in order to use this.
+# (Replaces the `OBSCURE_CHECKS_ENAB', `CRACKLIB_DICTPATH')
+#
+# password required	  pam_cracklib.so retry=3 minlen=6 difok=3
+# password required	  pam_unix.so use_authtok nullok md5
+
Index: scripts/puestos/mintldap/ldap/common-session.bak
===================================================================
--- scripts/puestos/mintldap/ldap/common-session.bak	(nonexistent)
+++ scripts/puestos/mintldap/ldap/common-session.bak	(revision 535)
@@ -0,0 +1,9 @@
+#
+# /etc/pam.d/common-session - session-related modules common to all services
+#
+# This file is included from other service-specific PAM config files,
+# and should contain a list of modules that define tasks to be performed
+# at the start and end of sessions of *any* kind (both interactive and
+# non-interactive).  The default is pam_unix.
+#
+session	required	pam_unix.so
Index: scripts/puestos/mintldap/ldap/nsswitch.conf
===================================================================
--- scripts/puestos/mintldap/ldap/nsswitch.conf	(nonexistent)
+++ scripts/puestos/mintldap/ldap/nsswitch.conf	(revision 535)
@@ -0,0 +1,21 @@
+# /etc/nsswitch.conf
+#
+# Example configuration of GNU Name Service Switch functionality.
+# If you have the `glibc-doc-reference' and `info' packages installed, try:
+# `info libc "Name Service Switch"' for information about this file.
+
+netgroup:         files ldap
+automount:         files ldap
+passwd:         files ldap [NOTFOUND=return] db
+group:          files ldap [NOTFOUND=return] db
+shadow:         files ldap
+
+hosts:          files dns
+networks:       files
+
+protocols:      db files
+services:       db files
+ethers:         db files
+rpc:            db files
+
+# netgroup:       nis
Index: scripts/puestos/mintldap/ldap/common-auth
===================================================================
--- scripts/puestos/mintldap/ldap/common-auth	(nonexistent)
+++ scripts/puestos/mintldap/ldap/common-auth	(revision 535)
@@ -0,0 +1,12 @@
+#
+# /etc/pam.d/common-auth - authentication settings common to all services
+#
+# This file is included from other service-specific PAM config files,
+# and should contain a list of the authentication modules that define
+# the central authentication scheme for use on the system
+# (e.g., /etc/shadow, LDAP, Kerberos, etc.).  The default is to use the
+# traditional Unix authentication mechanisms.
+#
+auth	optional	pam_group.so
+auth	sufficient	pam_unix.so shadow nullok_secure
+auth	required	pam_ldap.so use_first_pass
Index: scripts/puestos/mintldap/ldap/common-password
===================================================================
--- scripts/puestos/mintldap/ldap/common-password	(nonexistent)
+++ scripts/puestos/mintldap/ldap/common-password	(revision 535)
@@ -0,0 +1,28 @@
+#
+# /etc/pam.d/common-password - password-related modules common to all services
+#
+# This file is included from other service-specific PAM config files,
+# and should contain a list of modules that define  the services to be
+#used to change user passwords.  The default is pam_unix
+
+# The "nullok" option allows users to change an empty password, else
+# empty passwords are treated as locked accounts.
+#
+# (Add `md5' after the module name to enable MD5 passwords)
+#
+# The "obscure" option replaces the old `OBSCURE_CHECKS_ENAB' option in
+# login.defs. Also the "min" and "max" options enforce the length of the
+# new password.
+
+password   sufficient pam_ldap.so
+password   required   pam_unix.so nullok obscure min=4 max=8 md5
+
+# Alternate strength checking for password. Note that this
+# requires the libpam-cracklib package to be installed.
+# You will need to comment out the password line above and
+# uncomment the next two in order to use this.
+# (Replaces the `OBSCURE_CHECKS_ENAB', `CRACKLIB_DICTPATH')
+#
+# password required	  pam_cracklib.so retry=3 minlen=6 difok=3
+# password required	  pam_unix.so use_authtok nullok md5
+
Index: scripts/puestos/mintldap/ldap/common-session
===================================================================
--- scripts/puestos/mintldap/ldap/common-session	(nonexistent)
+++ scripts/puestos/mintldap/ldap/common-session	(revision 535)
@@ -0,0 +1,11 @@
+#
+# /etc/pam.d/common-session - session-related modules common to all services
+#
+# This file is included from other service-specific PAM config files,
+# and should contain a list of modules that define tasks to be performed
+# at the start and end of sessions of *any* kind (both interactive and
+# non-interactive).  The default is pam_unix.
+#
+session	required	pam_env.so
+session	optional	pam_foreground.so
+session	required	pam_unix.so
Index: scripts/puestos/mintldap/ldap/nss-ldapd.conf
===================================================================
--- scripts/puestos/mintldap/ldap/nss-ldapd.conf	(nonexistent)
+++ scripts/puestos/mintldap/ldap/nss-ldapd.conf	(revision 535)
@@ -0,0 +1,24 @@
+# /etc/nss-ldapd.conf
+# nss-ldapd configuration file. See nss-ldapd.conf(5)
+# for details.
+
+# The user and group nslcd should run as.
+uid nslcd
+gid nslcd
+
+# The location at which the LDAP server(s) should be reachable.
+uri ldap://ldap
+
+# The search base that will be used for all queries.
+base dc=instituto,dc=extremadura,dc=es
+
+# The LDAP protocol version to use.
+#ldap_version 3
+
+# The DN to bind with for normal lookups.
+#binddn cn=annonymous,dc=example,dc=net
+#bindpw secret
+
+# The search scope.
+#scope sub
+
Index: scripts/puestos/mintldap/ldap/libnss-ldap.conf
===================================================================
--- scripts/puestos/mintldap/ldap/libnss-ldap.conf	(nonexistent)
+++ scripts/puestos/mintldap/ldap/libnss-ldap.conf	(revision 535)
@@ -0,0 +1,327 @@
+###DEBCONF###
+# the configuration of this file will be done by debconf as long as the
+# first line of the file says '###DEBCONF###'
+#
+# you should use dpkg-reconfigure libnss-ldap to configure this file.
+#
+# @(#)$Id: ldap.conf,v 2.47 2006/05/15 08:13:44 lukeh Exp $
+#
+# This is the configuration file for the LDAP nameservice
+# switch library and the LDAP PAM module.
+#
+# PADL Software
+# http://www.padl.com
+#
+
+# Your LDAP server. Must be resolvable without using LDAP.
+# Multiple hosts may be specified, each separated by a 
+# space. How long nss_ldap takes to failover depends on
+# whether your LDAP client library supports configurable
+# network or connect timeouts (see bind_timelimit).
+host ldap
+
+# The distinguished name of the search base.
+base dc=instituto,dc=extremadura,dc=es
+nss_base_passwd ou=People,
+nss_base_group ou=Group,
+nss_base_netgroup ou=Netgroup,
+
+# Another way to specify your LDAP server is to provide an
+# uri with the server name. This allows to use
+# Unix Domain Sockets to connect to a local LDAP Server.
+#uri ldap://127.0.0.1/
+#uri ldaps://127.0.0.1/   
+#uri ldapi://%2fvar%2frun%2fldapi_sock/
+# Note: %2f encodes the '/' used as directory separator
+
+# The LDAP version to use (defaults to 3
+# if supported by client library)
+ldap_version 3
+
+# The distinguished name to bind to the server with.
+# Optional: default is to bind anonymously.
+# Please do not put double quotes around it as they
+# would be included literally.
+#binddn cn=proxyuser,dc=padl,dc=com
+
+# The credentials to bind with. 
+# Optional: default is no credential.
+#bindpw secret
+
+# The distinguished name to bind to the server with
+# if the effective user ID is root. Password is
+# stored in /etc/libnss-ldap.secret (mode 600)
+# Use 'echo -n "mypassword" > /etc/libnss-ldap.secret' instead
+# of an editor to create the file.
+rootbinddn cn=admin,ou=People,dc=skole,dc=skolelinux,dc=no
+
+# The port.
+# Optional: default is 389.
+#port 389
+
+# The search scope.
+#scope sub
+#scope one
+#scope base
+
+# Search timelimit
+#timelimit 30
+
+# Bind/connect timelimit
+#bind_timelimit 30
+
+# Reconnect policy:
+#  hard_open: reconnect to DSA with exponential backoff if
+#             opening connection failed
+#  hard_init: reconnect to DSA with exponential backoff if
+#             initializing connection failed
+#  hard:      alias for hard_open
+#  soft:      return immediately on server failure
+#bind_policy hard
+bind_policy soft
+
+# Connection policy:
+#  persist:   DSA connections are kept open (default)
+#  oneshot:   DSA connections destroyed after request
+#nss_connect_policy persist
+
+# Idle timelimit; client will close connections
+# (nss_ldap only) if the server has not been contacted
+# for the number of seconds specified below.
+#idle_timelimit 3600
+
+# Use paged rseults
+#nss_paged_results yes
+
+# Pagesize: when paged results enable, used to set the
+# pagesize to a custom value
+#pagesize 1000
+
+# Filter to AND with uid=%s
+#pam_filter objectclass=account
+
+# The user ID attribute (defaults to uid)
+#pam_login_attribute uid
+
+# Search the root DSE for the password policy (works
+# with Netscape Directory Server)
+#pam_lookup_policy yes
+
+# Check the 'host' attribute for access control
+# Default is no; if set to yes, and user has no
+# value for the host attribute, and pam_ldap is
+# configured for account management (authorization)
+# then the user will not be allowed to login.
+#pam_check_host_attr yes
+
+# Check the 'authorizedService' attribute for access
+# control
+# Default is no; if set to yes, and the user has no
+# value for the authorizedService attribute, and
+# pam_ldap is configured for account management
+# (authorization) then the user will not be allowed
+# to login.
+#pam_check_service_attr yes
+
+# Group to enforce membership of
+#pam_groupdn cn=PAM,ou=Groups,dc=padl,dc=com
+
+# Group member attribute
+#pam_member_attribute uniquemember
+
+# Specify a minium or maximum UID number allowed
+#pam_min_uid 0
+#pam_max_uid 0
+
+# Template login attribute, default template user
+# (can be overriden by value of former attribute
+# in user's entry)
+#pam_login_attribute userPrincipalName
+#pam_template_login_attribute uid
+#pam_template_login nobody
+
+# HEADS UP: the pam_crypt, pam_nds_passwd,
+# and pam_ad_passwd options are no
+# longer supported.
+#
+# Do not hash the password at all; presume
+# the directory server will do it, if
+# necessary. This is the default.
+#pam_password clear
+
+# Hash password locally; required for University of
+# Michigan LDAP server, and works with Netscape
+# Directory Server if you're using the UNIX-Crypt
+# hash mechanism and not using the NT Synchronization
+# service. 
+#pam_password crypt
+
+# Remove old password first, then update in
+# cleartext. Necessary for use with Novell
+# Directory Services (NDS)
+#pam_password nds
+
+# RACF is an alias for the above. For use with
+# IBM RACF
+#pam_password racf
+
+# Update Active Directory password, by
+# creating Unicode password and updating
+# unicodePwd attribute.
+#pam_password ad
+
+# Use the OpenLDAP password change
+# extended operation to update the password.
+#pam_password exop
+
+# Redirect users to a URL or somesuch on password
+# changes.
+#pam_password_prohibit_message Please visit http://internal to change your password.
+
+# Use backlinks for answering initgroups()
+#nss_initgroups backlink
+
+# Enable support for RFC2307bis (distinguished names in group
+# members)
+#nss_schema rfc2307bis
+
+# RFC2307bis naming contexts
+# Syntax:
+# nss_base_XXX		base?scope?filter
+# where scope is {base,one,sub}
+# and filter is a filter to be &'d with the
+# default filter.
+# You can omit the suffix eg:
+# nss_base_passwd	ou=People,
+# to append the default base DN but this
+# may incur a small performance impact.
+#nss_base_passwd	ou=People,dc=padl,dc=com?one
+#nss_base_shadow	ou=People,dc=padl,dc=com?one
+#nss_base_group		ou=Group,dc=padl,dc=com?one
+#nss_base_hosts		ou=Hosts,dc=padl,dc=com?one
+#nss_base_services	ou=Services,dc=padl,dc=com?one
+#nss_base_networks	ou=Networks,dc=padl,dc=com?one
+#nss_base_protocols	ou=Protocols,dc=padl,dc=com?one
+#nss_base_rpc		ou=Rpc,dc=padl,dc=com?one
+#nss_base_ethers	ou=Ethers,dc=padl,dc=com?one
+#nss_base_netmasks	ou=Networks,dc=padl,dc=com?ne
+#nss_base_bootparams	ou=Ethers,dc=padl,dc=com?one
+#nss_base_aliases	ou=Aliases,dc=padl,dc=com?one
+#nss_base_netgroup	ou=Netgroup,dc=padl,dc=com?one
+
+# attribute/objectclass mapping
+# Syntax:
+#nss_map_attribute	rfc2307attribute	mapped_attribute
+#nss_map_objectclass	rfc2307objectclass	mapped_objectclass
+
+# configure --enable-nds is no longer supported.
+# NDS mappings
+#nss_map_attribute uniqueMember member
+
+# Services for UNIX 3.5 mappings
+#nss_map_objectclass posixAccount User
+#nss_map_objectclass shadowAccount User
+#nss_map_attribute uid msSFU30Name
+#nss_map_attribute uniqueMember msSFU30PosixMember
+#nss_map_attribute userPassword msSFU30Password
+#nss_map_attribute homeDirectory msSFU30HomeDirectory
+#nss_map_attribute homeDirectory msSFUHomeDirectory
+#nss_map_objectclass posixGroup Group
+#pam_login_attribute msSFU30Name
+#pam_filter objectclass=User
+#pam_password ad
+
+# configure --enable-mssfu-schema is no longer supported.
+# Services for UNIX 2.0 mappings
+#nss_map_objectclass posixAccount User
+#nss_map_objectclass shadowAccount user
+#nss_map_attribute uid msSFUName
+#nss_map_attribute uniqueMember posixMember
+#nss_map_attribute userPassword msSFUPassword
+#nss_map_attribute homeDirectory msSFUHomeDirectory
+#nss_map_attribute shadowLastChange pwdLastSet
+#nss_map_objectclass posixGroup Group
+#nss_map_attribute cn msSFUName
+#pam_login_attribute msSFUName
+#pam_filter objectclass=User
+#pam_password ad
+
+# RFC 2307 (AD) mappings
+#nss_map_objectclass posixAccount user
+#nss_map_objectclass shadowAccount user
+#nss_map_attribute uid sAMAccountName
+#nss_map_attribute homeDirectory unixHomeDirectory
+#nss_map_attribute shadowLastChange pwdLastSet
+#nss_map_objectclass posixGroup group
+#nss_map_attribute uniqueMember member
+#pam_login_attribute sAMAccountName
+#pam_filter objectclass=User
+#pam_password ad
+
+# configure --enable-authpassword is no longer supported
+# AuthPassword mappings
+#nss_map_attribute userPassword authPassword
+
+# AIX SecureWay mappings
+#nss_map_objectclass posixAccount aixAccount
+#nss_base_passwd ou=aixaccount,?one
+#nss_map_attribute uid userName
+#nss_map_attribute gidNumber gid
+#nss_map_attribute uidNumber uid
+#nss_map_attribute userPassword passwordChar
+#nss_map_objectclass posixGroup aixAccessGroup
+#nss_base_group ou=aixgroup,?one
+#nss_map_attribute cn groupName
+#nss_map_attribute uniqueMember member
+#pam_login_attribute userName
+#pam_filter objectclass=aixAccount
+#pam_password clear
+
+# For pre-RFC2307bis automount schema
+#nss_map_objectclass automountMap nisMap
+#nss_map_attribute automountMapName nisMapName
+#nss_map_objectclass automount nisObject
+#nss_map_attribute automountKey cn
+#nss_map_attribute automountInformation nisMapEntry
+
+# Netscape SDK LDAPS
+#ssl on
+
+# Netscape SDK SSL options
+#sslpath /etc/ssl/certs
+
+# OpenLDAP SSL mechanism
+# start_tls mechanism uses the normal LDAP port, LDAPS typically 636
+#ssl start_tls
+#ssl on
+
+# OpenLDAP SSL options
+# Require and verify server certificate (yes/no)
+# Default is to use libldap's default behavior, which can be configured in
+# /etc/openldap/ldap.conf using the TLS_REQCERT setting.  The default for
+# OpenLDAP 2.0 and earlier is "no", for 2.1 and later is "yes".
+#tls_checkpeer yes
+
+# CA certificates for server certificate verification
+# At least one of these are required if tls_checkpeer is "yes"
+#tls_cacertfile /etc/ssl/ca.cert
+#tls_cacertdir /etc/ssl/certs
+
+# Seed the PRNG if /dev/urandom is not provided
+#tls_randfile /var/run/egd-pool
+
+# SSL cipher suite
+# See man ciphers for syntax
+#tls_ciphers TLSv1
+
+# Client certificate and key
+# Use these, if your server requires client authentication.
+#tls_cert
+#tls_key
+
+# Disable SASL security layers. This is needed for AD.
+#sasl_secprops maxssf=0
+
+# Override the default Kerberos ticket cache location.
+#krb5_ccname FILE:/etc/.ldapcache
+
Index: scripts/puestos/mintldap/ldap/common-account.bak
===================================================================
--- scripts/puestos/mintldap/ldap/common-account.bak	(nonexistent)
+++ scripts/puestos/mintldap/ldap/common-account.bak	(revision 535)
@@ -0,0 +1,9 @@
+#
+# /etc/pam.d/common-account - authorization settings common to all services
+#
+# This file is included from other service-specific PAM config files,
+# and should contain a list of the authorization modules that define
+# the central access policy for use on the system.  The default is to
+# only deny service to users whose accounts are expired in /etc/shadow.
+#
+account	required	pam_unix.so
Index: scripts/puestos/mintldap/ldap/group.conf
===================================================================
--- scripts/puestos/mintldap/ldap/group.conf	(nonexistent)
+++ scripts/puestos/mintldap/ldap/group.conf	(revision 535)
@@ -0,0 +1,61 @@
+##
+## Note, to get this to work as it is currently typed you need
+##
+## 1. to run an application as root
+## 2. add the following groups to the /etc/group file:
+##		floppy, games, sound
+##
+#
+# *** Please note that giving group membership on a session basis is
+# *** NOT inherently secure. If a user can create an executable that
+# *** is setgid a group that they are infrequently given membership
+# *** of, they can basically obtain group membership any time they
+# *** like. Example: games are allowed between the hours of 6pm and 6am
+# *** user joe logs in at 7pm writes a small C-program toplay.c that
+# *** invokes their favorite shell, compiles it and does
+# *** "chgrp games toplay; chmod g+s toplay". They are basically able
+# *** to play games any time... You have been warned. AGM
+#
+# this is an example configuration file for the pam_group module. Its
+# syntax is based on that of the pam_time module and (at some point in
+# the distant past was inspired by the 'shadow' package)
+#
+# the syntax of the lines is as follows:
+#
+#       services;ttys;users;times;groups
+#
+# white space is ignored and lines maybe extended with '\\n' (escaped
+# newlines). From reading these comments, it is clear that
+# text following a '#' is ignored to the end of the line.
+#
+# the first four fields are described in the pam_time directory.
+# The only difference for these is how the time field is interpretted:
+# it is used to indicate "when" these groups are to be given to the user.
+#
+# groups
+#	The (comma or space separated) list of groups that the user 
+#	inherits membership of. These groups are added if the previous
+#	fields are satisfied by the user's request
+#
+
+#
+# Here is a simple example: running 'xsh' on tty* (any ttyXXX device),
+# the user 'us' is given access to the floppy (through membership of
+# the floppy group)
+#
+
+#xsh;tty*&!ttyp*;us;Al0000-2400;floppy
+# another example: running 'xsh' on tty* (any ttyXXX device),
+# the user 'sword' is given access to games (through membership of
+# the sound and play group) after work hours.  (The games group owns
+# high-score files and so on, so don't ever give users access to it.)
+#
+
+#xsh; tty* ;sword;!Wk0900-1800;sound, play
+#xsh; tty* ;*;Al0900-1800;floppy
+
+*; tty*&!ttyp*; *; Al0000-2400; audio,cdrom,floppy,plugdev,video
+*; :0; *; Al0000-2400; audio,cdrom,floppy,plugdev,video
+#
+# End of group.conf file
+#
Index: scripts/puestos/mintldap/ldap/ssl/ldap-server-pubkey.pem
===================================================================
--- scripts/puestos/mintldap/ldap/ssl/ldap-server-pubkey.pem	(nonexistent)
+++ scripts/puestos/mintldap/ldap/ssl/ldap-server-pubkey.pem	(revision 535)
@@ -0,0 +1,18 @@
+-----BEGIN CERTIFICATE-----
+MIICzTCCAjagAwIBAgIJAMKZ1j21yBqqMA0GCSqGSIb3DQEBBQUAMIGcMQswCQYD
+VQQGEwJFUzELMAkGA1UECBMCRVgxDTALBgNVBAcTBGV0Y2gxFDASBgNVBAoTC0xk
+YXAgc2VydmVyMS0wKwYDVQQLEyRBdXRvbWF0aWNhbGx5LWdlbmVyYXRlZCBMZGFw
+IFNTTCBrZXkxDTALBgNVBAMTBGxkYXAxHTAbBgkqhkiG9w0BCQEWDmF1bGxhbkB1
+bmV4LmVzMB4XDTA3MDkxODEwNDYzNFoXDTA3MTAxODEwNDYzNFowgZwxCzAJBgNV
+BAYTAkVTMQswCQYDVQQIEwJFWDENMAsGA1UEBxMEZXRjaDEUMBIGA1UEChMLTGRh
+cCBzZXJ2ZXIxLTArBgNVBAsTJEF1dG9tYXRpY2FsbHktZ2VuZXJhdGVkIExkYXAg
+U1NMIGtleTENMAsGA1UEAxMEbGRhcDEdMBsGCSqGSIb3DQEJARYOYXVsbGFuQHVu
+ZXguZXMwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAMeTA9Tprg0LKWkfy61C
+S+NodCowjcdlIEhbIpNt7gqapUODQgZIKbCMk7n5bWNxNoL9e196Gc2AGiAqHySa
+J6gMS/+I22MP3nxjMWT0gTQdB1CT40dSMhG1dfVdhnvuTY0wy8IZFY8d+9hZ+8ul
+sz2OzIK1vUNeHhyrlhk3AtcXAgMBAAGjFTATMBEGCWCGSAGG+EIBAQQEAwIGQDAN
+BgkqhkiG9w0BAQUFAAOBgQBNnzFpEGibrcpOWihHfccX10pKQsoiJnjJNpcMVTKS
+0jJW5EtqiXN6ejEvkXL1vZLWdDu6bNYQg44cbICzWldx+LlXx3GKC4IWevUBM00p
+eXV0/E6UG0J8Cxn4gQLtkx5ZaSrDWgMC/kK5enoUWyDnbMEJvdsoSyQUQK2nwu87
+ig==
+-----END CERTIFICATE-----
Index: scripts/puestos/mintldap/ldap/pam_ldap.conf
===================================================================
--- scripts/puestos/mintldap/ldap/pam_ldap.conf	(nonexistent)
+++ scripts/puestos/mintldap/ldap/pam_ldap.conf	(revision 535)
@@ -0,0 +1,300 @@
+###DEBCONF###
+# the configuration of this file will be done by debconf as long as the
+# first line of the file says '###DEBCONF###'
+#
+# you should use dpkg-reconfigure to configure this file
+#
+# @(#)$Id: ldap.conf,v 1.36 2005/03/23 08:29:59 lukeh Exp $
+#
+# This is the configuration file for the LDAP nameservice
+# switch library and the LDAP PAM module.
+#
+# PADL Software
+# http://www.padl.com
+#
+
+# Your LDAP server. Must be resolvable without using LDAP.
+# Multiple hosts may be specified, each separated by a 
+# space. How long nss_ldap takes to failover depends on
+# whether your LDAP client library supports configurable
+# network or connect timeouts (see bind_timelimit).
+host ldap
+
+# The distinguished name of the search base.
+# base dc=skole,dc=skolelinux,dc=no
+base ou=People,dc=instituto,dc=extremadura,dc=es
+
+# Another way to specify your LDAP server is to provide an
+# uri with the server name. This allows to use
+# Unix Domain Sockets to connect to a local LDAP Server.
+#uri ldap://127.0.0.1/
+#uri ldaps://127.0.0.1/   
+#uri ldapi://%2fvar%2frun%2fldapi_sock/
+# Note: %2f encodes the '/' used as directory separator
+
+# The LDAP version to use (defaults to 3
+# if supported by client library)
+ldap_version 3
+
+# The distinguished name to bind to the server with.
+# Optional: default is to bind anonymously.
+#binddn cn=proxyuser,dc=padl,dc=com
+
+# The credentials to bind with. 
+# Optional: default is no credential.
+#bindpw secret
+
+# The distinguished name to bind to the server with
+# if the effective user ID is root. Password is
+# stored in /etc/pam_ldap.secret (mode 600)
+#rootbinddn cn=manager,dc=padl,dc=com
+
+# The port.
+# Optional: default is 389.
+#port 389
+
+# The search scope.
+#scope sub
+#scope one
+#scope base
+
+# Search timelimit
+#timelimit 30
+
+# Bind/connect timelimit
+#bind_timelimit 30
+
+# Reconnect policy: hard (default) will retry connecting to
+# the software with exponential backoff, soft will fail
+# immediately.
+#bind_policy hard
+
+# Idle timelimit; client will close connections
+# (nss_ldap only) if the server has not been contacted
+# for the number of seconds specified below.
+#idle_timelimit 3600
+
+# Filter to AND with uid=%s
+#pam_filter objectclass=account
+pam_filter objectclass=posixAccount
+
+# The user ID attribute (defaults to uid)
+#pam_login_attribute uid
+
+# Search the root DSE for the password policy (works
+# with Netscape Directory Server)
+#pam_lookup_policy yes
+
+# Check the 'host' attribute for access control
+# Default is no; if set to yes, and user has no
+# value for the host attribute, and pam_ldap is
+# configured for account management (authorization)
+# then the user will not be allowed to login.
+#pam_check_host_attr yes
+
+# Check the 'authorizedService' attribute for access
+# control
+# Default is no; if set to yes, and the user has no
+# value for the authorizedService attribute, and
+# pam_ldap is configured for account management
+# (authorization) then the user will not be allowed
+# to login.
+#pam_check_service_attr yes
+
+# Group to enforce membership of
+#pam_groupdn cn=PAM,ou=Groups,dc=padl,dc=com
+
+# Group member attribute
+#pam_member_attribute uniquemember
+
+# Specify a minium or maximum UID number allowed
+#pam_min_uid 0
+#pam_max_uid 0
+
+# Template login attribute, default template user
+# (can be overriden by value of former attribute
+# in user's entry)
+#pam_login_attribute userPrincipalName
+#pam_template_login_attribute uid
+#pam_template_login nobody
+
+# HEADS UP: the pam_crypt, pam_nds_passwd,
+# and pam_ad_passwd options are no
+# longer supported.
+#
+# If you are using XAD, you can set pam_password
+# to racf, ad, or exop. Make sure that you have
+# SSL enabled.
+
+# Do not hash the password at all; presume
+# the directory server will do it, if
+# necessary. This is the default.
+pam_password exop
+
+# Hash password locally; required for University of
+# Michigan LDAP server, and works with Netscape
+# Directory Server if you're using the UNIX-Crypt
+# hash mechanism and not using the NT Synchronization
+# service. 
+#pam_password crypt
+
+# Remove old password first, then update in
+# cleartext. Necessary for use with Novell
+# Directory Services (NDS)
+#pam_password clear_remove_old
+#pam_password nds
+
+# RACF is an alias for the above. For use with
+# IBM RACF
+#pam_password racf
+
+# Update Active Directory password, by
+# creating Unicode password and updating
+# unicodePwd attribute.
+#pam_password ad
+
+# Use the OpenLDAP password change
+# extended operation to update the password.
+#pam_password exop
+
+# Redirect users to a URL or somesuch on password
+# changes.
+#pam_password_prohibit_message Please visit http://internal to change your password.
+
+# RFC2307bis naming contexts
+# Syntax:
+# nss_base_XXX		base?scope?filter
+# where scope is {base,one,sub}
+# and filter is a filter to be &'d with the
+# default filter.
+# You can omit the suffix eg:
+# nss_base_passwd	ou=People,
+# to append the default base DN but this
+# may incur a small performance impact.
+#nss_base_passwd	ou=People,dc=padl,dc=com?one
+#nss_base_shadow	ou=People,dc=padl,dc=com?one
+#nss_base_group		ou=Group,dc=padl,dc=com?one
+#nss_base_hosts		ou=Hosts,dc=padl,dc=com?one
+#nss_base_services	ou=Services,dc=padl,dc=com?one
+#nss_base_networks	ou=Networks,dc=padl,dc=com?one
+#nss_base_protocols	ou=Protocols,dc=padl,dc=com?one
+#nss_base_rpc		ou=Rpc,dc=padl,dc=com?one
+#nss_base_ethers	ou=Ethers,dc=padl,dc=com?one
+#nss_base_netmasks	ou=Networks,dc=padl,dc=com?ne
+#nss_base_bootparams	ou=Ethers,dc=padl,dc=com?one
+#nss_base_aliases	ou=Aliases,dc=padl,dc=com?one
+#nss_base_netgroup	ou=Netgroup,dc=padl,dc=com?one
+
+# attribute/objectclass mapping
+# Syntax:
+#nss_map_attribute	rfc2307attribute	mapped_attribute
+#nss_map_objectclass	rfc2307objectclass	mapped_objectclass
+
+# configure --enable-nds is no longer supported.
+# NDS mappings
+#nss_map_attribute uniqueMember member
+
+# Services for UNIX 3.5 mappings
+#nss_map_objectclass posixAccount User
+#nss_map_objectclass shadowAccount User
+#nss_map_attribute uid msSFU30Name
+#nss_map_attribute uniqueMember msSFU30PosixMember
+#nss_map_attribute userPassword msSFU30Password
+#nss_map_attribute homeDirectory msSFU30HomeDirectory
+#nss_map_attribute homeDirectory msSFUHomeDirectory
+#nss_map_objectclass posixGroup Group
+#pam_login_attribute msSFU30Name
+#pam_filter objectclass=User
+#pam_password ad
+
+# configure --enable-mssfu-schema is no longer supported.
+# Services for UNIX 2.0 mappings
+#nss_map_objectclass posixAccount User
+#nss_map_objectclass shadowAccount user
+#nss_map_attribute uid msSFUName
+#nss_map_attribute uniqueMember posixMember
+#nss_map_attribute userPassword msSFUPassword
+#nss_map_attribute homeDirectory msSFUHomeDirectory
+#nss_map_attribute shadowLastChange pwdLastSet
+#nss_map_objectclass posixGroup Group
+#nss_map_attribute cn msSFUName
+#pam_login_attribute msSFUName
+#pam_filter objectclass=User
+#pam_password ad
+
+# RFC 2307 (AD) mappings
+#nss_map_objectclass posixAccount user
+#nss_map_objectclass shadowAccount user
+#nss_map_attribute uid sAMAccountName
+#nss_map_attribute homeDirectory unixHomeDirectory
+#nss_map_attribute shadowLastChange pwdLastSet
+#nss_map_objectclass posixGroup group
+#nss_map_attribute uniqueMember member
+#pam_login_attribute sAMAccountName
+#pam_filter objectclass=User
+#pam_password ad
+
+# configure --enable-authpassword is no longer supported
+# AuthPassword mappings
+#nss_map_attribute userPassword authPassword
+
+# AIX SecureWay mappings
+#nss_map_objectclass posixAccount aixAccount
+#nss_base_passwd ou=aixaccount,?one
+#nss_map_attribute uid userName
+#nss_map_attribute gidNumber gid
+#nss_map_attribute uidNumber uid
+#nss_map_attribute userPassword passwordChar
+#nss_map_objectclass posixGroup aixAccessGroup
+#nss_base_group ou=aixgroup,?one
+#nss_map_attribute cn groupName
+#nss_map_attribute uniqueMember member
+#pam_login_attribute userName
+#pam_filter objectclass=aixAccount
+#pam_password clear
+
+# Netscape SDK LDAPS
+#ssl on
+
+# Netscape SDK SSL options
+#sslpath /etc/ssl/certs/cert7.db
+
+# OpenLDAP SSL mechanism
+# start_tls mechanism uses the normal LDAP port, LDAPS typically 636
+#ssl start_tls
+#ssl on
+
+# OpenLDAP SSL options
+# Require and verify server certificate (yes/no)
+# Default is to use libldap's default behavior, which can be configured in
+# /etc/openldap/ldap.conf using the TLS_REQCERT setting.  The default for
+# OpenLDAP 2.0 and earlier is "no", for 2.1 and later is "yes".
+#tls_checkpeer yes
+
+# CA certificates for server certificate verification
+# At least one of these are required if tls_checkpeer is "yes"
+#tls_cacertfile /etc/ssl/ca.cert
+#tls_cacertdir /etc/ssl/certs
+
+# Seed the PRNG if /dev/urandom is not provided
+#tls_randfile /var/run/egd-pool
+
+# SSL cipher suite
+# See man ciphers for syntax
+#tls_ciphers TLSv1
+
+# Client certificate and key
+# Use these, if your server requires client authentication.
+#tls_cert
+#tls_key
+
+# Disable SASL security layers. This is needed for AD.
+#sasl_secprops maxssf=0
+
+# Override the default Kerberos ticket cache location.
+#krb5_ccname FILE:/etc/.ldapcache
+
+# SASL mechanism for PAM authentication - use is experimental
+# at present and does not support password policy control
+#pam_sasl_mech DIGEST-MD5
+ssl start_tls
Index: scripts/puestos/mintldap/ldap/common-account
===================================================================
--- scripts/puestos/mintldap/ldap/common-account	(nonexistent)
+++ scripts/puestos/mintldap/ldap/common-account	(revision 535)
@@ -0,0 +1,10 @@
+#
+# /etc/pam.d/common-account - authorization settings common to all services
+#
+# This file is included from other service-specific PAM config files,
+# and should contain a list of the authorization modules that define
+# the central access policy for use on the system.  The default is to
+# only deny service to users whose accounts are expired in /etc/shadow.
+#
+account    sufficient   pam_ldap.so
+account required        pam_unix.so
Index: scripts/puestos/mintldap/mintldap.sh
===================================================================
--- scripts/puestos/mintldap/mintldap.sh	(nonexistent)
+++ scripts/puestos/mintldap/mintldap.sh	(revision 535)
@@ -0,0 +1,54 @@
+#!/bin/bash
+
+#Ejecutado sobre un Linux basado en Debian (Mint, Ubuntu, Elementary,...) lo configura para 
+#que tenga validacion en el ldap del centro y montaje de los homes del nfs.
+
+#IMPORTANTE: No olvidar dar de alta como Workstation al equipo donde se ejecuta, mediante
+#controlies o el script addworkstation.sh.
+
+#OJO: Cambiar la IP del servidor nfs en la parte final del script.
+
+apt-get install nfs-common
+apt-get install libldap-2.4-2
+apt-get install ldap-utils
+apt-get install autofs5-ldap
+Update-rc.d -f autofs remove
+update-rc.d autofs start 26 2 3 4 5 . stop 26 0 1 6 .
+cp nscd.conf /etc
+#cp hal.conf /etc/dbus-1/system.d/
+#cp group.conf /etc/security
+
+apt-get install ntpdate
+
+#echo "NTPSERVERS=\"servidor\"" > /etc/default/ntp-servers
+#echo "NTPSERVERS=\"servidor\"" > /etc/default/ntpdate
+#echo "NTPOPTIONS=\"-u\"" >> /etc/default/ntpdate
+
+apt-get install libnss-ldapd
+apt-get install libpam-ldapd
+
+cp ldap/common* /etc/pam.d/
+cp ldap/group.conf /etc/security/
+cp ldap/ldap.conf /etc/ldap/
+cp ldap/nss-ldapd.conf /etc/ 
+cp ldap/nsswitch.conf /etc/ 
+cp ldap/pam_ldap.conf /etc/
+mkdir -p /etc/ldap/ssl
+cp ldap/ssl/ldap-server-pubkey.pem /etc/ldap/ssl/
+chmod  775 /etc/ldap/ssl
+
+#Pon aqui la IP de tu servidor NFS
+SERVIDORNFS="172.20.20.2"
+echo "Montando el servidor NFS $SERVIDORNFS"
+echo "$SERVIDORNFS:/home/ /home/ nfs nolock,rsize=16384,wsize=16384,timeo=20,retrans=10,intr,auto,rw 0 0" >> /etc/fstab
+
+#Añadimos a /etc/rc.local el forzado del montaje del /home para los NFS, ya que en algunos Mint/Ubuntu no 
+#se monta si no es asi.
+grep "mount /home" /etc/rc.local ||  sed -i -e "s#^exit 0\$#mount /home\n\nexit 0#g" /etc/rc.local
+
+
+
+
+
+
+
Index: tareas_puppet/servidores_aula/wheezy/ltsp_wheezy_ajustes/files/aulalinex.sh
===================================================================
--- tareas_puppet/servidores_aula/wheezy/ltsp_wheezy_ajustes/files/aulalinex.sh	(revision 534)
+++ tareas_puppet/servidores_aula/wheezy/ltsp_wheezy_ajustes/files/aulalinex.sh	(revision 535)
@@ -4,7 +4,7 @@
 
 equipo=$HOSTNAME
 
-if  [ "$equipo" == "A02-PRO.vguadalupe" -o "$equipo" == "A03-PRO.vguadalupe" ]
+if  [ "$equipo" == "A02-PRO.vguadalupe" -o "$equipo" == "A04-PRO.vguadalupe" ] # ........... añadir mas nombres de aula
 then
     #Versión de portatiles
    /usr/bin/aulalinex-profesor
Index: tareas_puppet/servidores_aula/wheezy/ltsp_wheezy_ajustes.tgz
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Index: tareas_puppet/workstations/wheezy/workstation_wheezy_ajustes/manifests/init.pp
===================================================================
--- tareas_puppet/workstations/wheezy/workstation_wheezy_ajustes/manifests/init.pp	(revision 534)
+++ tareas_puppet/workstations/wheezy/workstation_wheezy_ajustes/manifests/init.pp	(revision 535)
@@ -23,7 +23,12 @@
              }
              #============================================================================$
              #En los fujitsu p300, el driver de la tarjeta de red (tulip.ko) no soporta WOL
-             #hay que poner uno que si funciona. kernel 3.2.0-4-686-pae.
+             #hay que poner uno que si funciona. Elegir en files entre:
+	     #       kernel 3.2.0-4-686-pae
+             #       kernel 3.2.0-4-486-pae
+             #       kernel 3.16
+             #y sobreescribir alli tulip-wol-ok.ko con uno de ellos
+
              file  {"/lib/modules/3.2.0-4-686-pae/kernel/drivers/net/ethernet/dec/tulip/tulip.ko":
                  owner=> root, group=> root, mode => 664,
                  source => "puppet:///workstation_wheezy_ajustes/tulip-wol-ok.ko",
Index: tareas_puppet/workstations/wheezy/workstation_wheezy_ajustes/files/tulip.ko.3.2.0-4-486-pae
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tareas_puppet/workstations/wheezy/workstation_wheezy_ajustes/files/tulip.ko.3.2.0-4-486-pae
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: tareas_puppet/workstations/wheezy/workstation_wheezy_ajustes/files/tulip.ko.3.2.0-4-686-pae
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tareas_puppet/workstations/wheezy/workstation_wheezy_ajustes/files/tulip.ko.3.2.0-4-686-pae
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: tareas_puppet/workstations/wheezy/workstation_wheezy_ajustes/files/aulalinex.sh
===================================================================
--- tareas_puppet/workstations/wheezy/workstation_wheezy_ajustes/files/aulalinex.sh	(revision 534)
+++ tareas_puppet/workstations/wheezy/workstation_wheezy_ajustes/files/aulalinex.sh	(revision 535)
@@ -4,7 +4,7 @@
 
 equipo=$HOSTNAME
 
-if  [ "$equipo" == "A02-PRO.vguadalupe" -o "$equipo" == "A03-PRO.vguadalupe" ]
+if  [ "$equipo" == "A02-PRO.vguadalupe" -o "$equipo" == "A04-PRO.vguadalupe" ] # ........... añadir mas nombres de aula
 then
     #Versión de portatiles
    /usr/bin/aulalinex-profesor
Index: tareas_puppet/workstations/wheezy/workstation_wheezy_ajustes/files/tulip.ko.3.16
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: tareas_puppet/workstations/wheezy/workstation_wheezy_ajustes/files/tulip.ko.3.16
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: tareas_puppet/workstations/wheezy/workstation_wheezy_ajustes.tgz
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
