Lingering Users and Painfully Slow OpenOffice Startup

R. Scott Belford scott at hosef.org
Fri Nov 16 20:29:08 GMT 2007


Bill Moseley wrote:
> 
> How do you push out changes like these to all existing (and new)
> users?

If we were not using NFS mounted home directories, I would use Sabayon. 
  Becasue we use nfs home directories and smbldap authentication, I have 
a script that the teacher can run after modifying the template user.  I 
am sure it can be done better.


#!/bin/bash

# settings
BASE_HOME_DIR=/home/students
TEMPLATE_FILE=/home/students/template/template.tar.gz
BASE_TEMPLATE_DIR=/home/students/template

cd ${BASE_TEMPLATE_DIR}

tar -cvzf template.tar.gz * .[a-zA-Z0-9]*

cd ${BASE_HOME_DIR}
for USER in `ls`
do
     echo 'Extracting for user:' ${USER}
     cd ${BASE_HOME_DIR}/${USER}
     tar -zxvf ${TEMPLATE_FILE}
     rm -f template.tar.gz
     chown -fR ${USER}:Domain\ Users * .[^.]*
done



--scott



More information about the edubuntu-users mailing list