|
#!/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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|