The basic script is installed under /Library/Scripts and is run upon login. This currently contains the comment sections from the cleanbasic script
#set -xv; exec 1>>/tmp/out 2>&1
#The line above is used for logging and troubleshooting only - if you need to troubleshoot this script, remove the "#" from the line.
# Once you are done, put the "#" back at the beginning of the line.
#Update on June 27, 2006 - added support for 10.3 clients and other improvements
#Update on July 10, 2006 - added feature so that all local users will bypass redirection.
#Update Oct 13, 2006 - UW specific to avoid .cshrc error - add -f flag to su commands
# more extreme (works only for 10.4 clients; remove su (and tail EOF) and let the whole thing run as root
# to try to prevent exposure in case logout hook doesn't run, or to try to avoid vulnerabilty:
# clear /tmp as part of login hook as well as logout,
# create user owned subdirectory of /tmp, and symlink to there, instead of to the /tmp level
#Superseded Sept25, 2007 - now removed unconditionally
#Oct 27, 2006 - some Tutors in testing got font errors from Word and Excel
# at first login after the script, remove Library/Preferences/Microsoft
#
# Superseded Sept 25, 2007 re automount
#Nov 8, 2006 - RT#56004 new opportunity to clean up "automount". Previous users have been piling up
# the system then tries repeatedly (and fails, on permissions of course) to mount each of their network home directories
#
# - also, may move functionality here from .cshrc to provide a skeleton .drjava file, if one does not exist
#
#Nov 15, 2006 - RT#54169 - fix .Xauthority problem
#Superseded Sept 25, 2007
#Dec 4, 2006 - RT#56181 - some students lose all their files when they log in; on the assumption that
# the clean up automount section *might* be the villain - ie it does rm-rf *if* username doesn't match, so what if there is a glitch??
# comment it out for now
# Superseded Sept 25, 2007
#Dec 12, 2006 - add some more paranoia checking to clean up automount section, and remove the old
# previously commented out portion
#
#Sept 25 - 28, 2007 - major re-write
# created an archive copy as well as the RCS'd old versions since major removal of automount section
# because of login problems at start of term RT#59728
# We turnded "off" automount, home directories now mount differently; AND, we don't have the
# problem of dangling directories from previous users, and the resulting attempts to automount them.
# Part 2 of Sept 25, 2007
# Added logic from the "clean.sh" version of the original script package to clean Microsoft Office footprints.
# Labs were having problems such as unable to save Excel Macros
# Sept 28 - revised copied logic from "original" NHR
# don't touch ~/Documents/Microsoft User Data
# don't copy cscfadm/Library/Preferences/Microsoft - just let Office re-create it,
# as the manual workaround in the Labs was doing
# Don't delete all of~/Library/Preferences/Microsoft - takes too long to re-create
# Part3 of Sept 25, 2007
# Changed sqlany10 parameters - no "Shared" folder
# Oct 15, 2007 - fixed path for SQLAnywhere 10 - no lib, change to lib32
#
# added line Jan 29, 2008 to try to overcome a startup issue with Adobe Illustrator cs
# Jan 30 - comment it out because Sassafras suggests issue may really be that we are blowing away /tmp completely in this login hook
# revise login to not touch /tmp,
# and logout hooks to just remove user directories under /tmp
# Update Aug 25, 2008 - 1) Leopard compatibility - remove nicl command, replace with dscl
# good for both Tiger and Leopard
# 2) SQLAnywhere only version 10; remove v9
# Sept 19, 2008 - Leopard specific version required for X11 compatibility changes - xauth
# Aug 26, 2009 - Leopard OD can manage folder redirection via com.apple.MCXRedirector plugin
# so comment out our folder re-direction of ~/Library/Caches, and ~/Library/Fonts
# Aug 25, 2008 - LocalAdminUser no longer required, and nicl not supported in Leopard
# added Jan 29, 2008 *** superseded Jan 30 - comment out
# to force key access to be running at login, as login user, to overcome an issue with Adobe Illustrator CS
#EOF
#This script will re-direct several the Caches and Fonts folders from a user's network home location to the local machine to help with performance.
# Please remember to set a login hook for this script so that it runs at each login (sudo defaults write com.apple.loginwindow LoginHook /path/to/script).
# This script will not run for any user that has an account in the local Netinfo database (either a local user or a mobile account or portable home directory).
#This section will create ~/.MacOSX/environment.plist if it does not exist, and configure XAUTHORITY
#changed logic because Ed also needs this file to configure CS200 for Web and Database
# so append these lines unconditionally
#Oct 15, 2007 change lib to lib32 in SQL10 Library Path
#Aug 25, 2008 remove SQL version 9
#Sep 19, 2008 clear XAUTH Leopard different than Tiger; and remove old unnecessary lock files
#Sept 25, 2007 major section removed re cleaning automount - archive is in cleanbasic20070925.sh
#
#This section will delete the Caches and Fonts folders from the current user's network home location
#su $1 -cf /bin/sh <<EOF
#Sept 25, 2007 major section removed re conditional cleaning Microsoft Office files
# now done unconditionally below - archive is in cleanbasic20070925.sh
# Aug 26, 2009 done now by Open Directory
#EOF
#This last section will set up symbolic links for the current user.
# changed Aug 25, 2008
# Aug 26, 2009 done now by Open Directory??
#This will copy the Microsoft Preferences folder of the local admin user (make sure this account was the first account set up on the client - with UID 501) to /tmp with the correct permissions. Make sure to delete the Clip Gallery Preference file from the local admin's Library/Preferences folder), as Clipart will not function properly if you leave this preference file in this folder.
#This will copy the Microsoft User Data folder of the local admin user (make sure this account was the first account set up on the client - with UID 501) to /tmp with the correct permissions.
# Aug 26, 2009 done now by Open Directory
#ln -s /private/tmp/$1/Caches/ $home_loc/Library/Caches
#EOF
logger - "LoginHook: Finished for $1"
#Remember to run a logout hook that will delete the contents of /tmp
--
EdwardChrzanowski - 2014-09-19