Cartelle Condivise
NFS
#!/bin/bash
#
# Piccolo script per creare un albero generico di cartelle
# condivise per gruppi (o classi) con i docenti come supervisori
# Copyright (C) 2005 FUSS Project Golden Team <golden-team@fuss.bz.it>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
echo -n "Gruppo generale dei docenti? "
read docenti
echo -n "Dove creare tutte le cartelle? "
read dove
echo $docenti
echo $dove
for gruppo in `cat $1`; do
smbldap-groupadd $gruppo
echo Creo cartella per gruppo $gruppo
mkdir $dove/$gruppo
chmod 2750 $dove/$gruppo
chown localadmin.$gruppo $dove/$gruppo
echo Creo cartella comune per gruppo $gruppo
mkdir $dove/$gruppo/common
chmod 3770 $dove/$gruppo/common
chown localadmin.$gruppo $dove/$gruppo/common
echo Creo cartella compiti per gruppo $gruppo
mkdir $dove/$gruppo/compiti
chmod 3775 $dove/$gruppo/compiti
chown localadmin.$docenti $dove/$gruppo/compiti
echo Creo cartella verifiche per gruppo $gruppo
mkdir $dove/$gruppo/verifiche
chmod 3773 $dove/$gruppo/verifiche
chown localadmin.$docenti $dove/$gruppo/verifiche
done
echo Finito
SAMBA