On Oct 27, 2004, at 11:07 AM, Bobby Knueven wrote:
I have an X-Serve, Raid setup with 10.3.5 and would like to copy a
preference file to all of my users home directories stored on my RAID.
Is there an easy way to do this?
I was going to write a script, but then I just looked in my list
archive and found this one. I think Jason Deraleau wrote it. Give it a
try.
# Let's make sure we have the appropriate privileges
if [ ${UID} == 0 ]; then
# Do our thing
for i in $(ls ${HOMEDIRS})
do
if [ -d ${HOMEDIRS}/${i}/${DESTINATION} ]; then
cp ${FILETOCOPY} ${HOMEDIRS}/${i}/${DESTINATION}/
chown ${i} ${HOMEDIRS}/${i}/${DESTINATION}/$(basename
${FILETOCOPY})
fi
done
else
echo "Please use sudo or su to run this script with superuser
privileges."
exit 1
fi
-
Josh Wisenbaker, ACSA
Sr. Systems Engineer
ComputerTree Technologies
1-800-467-9820