[Casper] Flushing User Caches
Gene Anderson
ganderson at phrd.ab.ca
Wed Jan 21 20:31:44 PST 2009
Miles Leacy <miles.leacy at themacadmin.com> writes:
>When you run a script via a Casper policy, $3 = the user's shortname. This is why I structure my commands to target /Users/$3/
>
>This may be a matter of preference, but I would skip the $file variable and the for loop in this case. We're operating on known values. To me, at least, it seems unnecessary to declare $file and then set up a for/if structure when we can just operate on each item and save lines.
>
>The script below accomplishes the goal with just a few lines and is set up to be run as part of a Casper policy triggered by login.
Okay, I must be missing something here because I can't get this to work. Script is:
rm -Rf /Users/$3/Library/Caches/*
being executed on Tiger clients. Policy is set to execute on all Tiger workstations, trigger on login and frequency ongoing. The policy reports no errors. Should this command work from the Terminal? How does the $3 value in the script get assigned? If I manually execute the script from the Terminal the full path comes back as "/Users//Library/Caches". Does Casper somehow fill in the value for the script?
Gene Anderson
Systems Analyst, ACTC, MCP
Pembina Hills Regional Division No.7
Phone: (780) 674-8535 ext 6860
email: ganderson at phrd.ab.ca
"Passwords are like bubble gum, strongest when fresh, should never be
used by groups and create a sticky mess when left laying around"
-anon
More information about the Casper
mailing list