[Casper] Flushing User Caches
Criss Myers
CMyers at uclan.ac.uk
Thu Jan 22 05:56:33 PST 2009
ihooks are just bash scripts that have extension .hook and placed in the
hooks folder in /etc, with login hooks filename beginning with LI and
logout hooks LO, e.g LIFonts.hook , LOFonts.hook. All LI files are run
at login and all LO at logout one after the other, each can have custom
pictures or branding and each can display an output via echo so a user
can see the progress and state of the hook, this also helps for testing,
the size of the window can also be altered.
You can have as many login and logout hooks as you like, i keep mine
modular so i have a separate hook for each command so i can easily
remove or update by deploying new hooks via Casper.
For example I have a login hook that resets the Audio settings for the
audio hardware thats connected to a particular machine, its called
LIAudio.hook and has our company branding on it, it displays via echo
what is happening informing the user that is it copying the new
settings, i can then use this output to check that the hook is running
properly.
I also have a logout hook that displays a custom picture remind the user
to remove their USB drivers when they logout, it doesn't run any command
just changes to this picture and when done the other scripts run their
own picture.
Personally as my system was setup before Casper and i already had
working login and logout hooks which i can customize with my own company
branding i preferred to keep them rather than moving to Casper. I prefer
the flexibility that ihook offers to display feedback to the user as
well as custom pictures per hook.
I can deploy a new login hook by creating a package for it and deploying
it via Casper, if i need to remove it i can unistall it with Capser or
amend and deploy an updated version.
Personally I find this offers me what i want, BUT i have never used
Capser login hooks so do not know what feedback and display the output
for the user.
I also use ihook for running shell scripts that the user can execute
themselves without need terminal and give a graphical feedback.
For example i have a script which moves the contents of a backup folder
to the users home folder, which they can run themselves to recover data,
The double click and it opens the script via iHook with a custom picture
telling them whats happening and again feedback via echo.
Hope this all makes sense
Criss
Criss Myers
Senior Customer Support Analyst (Mac Services)
Apple Certified Technical Coordinator v10.5
LIS Business Support Team
Library 301
University of Central Lancashire
Preston PR1 2HE
Ex 5054
01772 895054
>>> On Thu, Jan 22, 2009 at 1:39 PM, in message
<ec2e75ff0901220539m7607dd69x119e0547fdd62033 at mail.gmail.com>, Miles
Leacy <miles.leacy at themacadmin.com> wrote:
I've used iHook in the past (back when I was a Radmind admin), but it's
been a while and I don't recall off hand how to properly write scripts
for it.
I gave up Radmind and iHook because with Casper I get a commercial
product with support, and an interface that I can teach to and document
for inexperienced techs rather easily.
I'd suggest dropping, or at least starting the slow, testing-heavy
process of moving from iHook to scripting through Casper policies. An
iHook script will only ever be a login script. A script, once it's in
your JSS, can be deployed via nearly any policy you can think up, or as
an ad-hoc action through Casper Remote.
Of course, the best solution is the one that works for you, so please
don't think I'm telling you you're doing anything wrong. I'm just
offering my point of view and the benefit of my experience.
----------
Miles A. Leacy IV
Certified System Administrator 10.4
Certified Technical Coordinator 10.5
Certified Trainer
Certified Casper Administrator
----------
voice: 1-347-277-7321
miles.leacy at themacadmin.com
www.themacadmin.com
On Thu, Jan 22, 2009 at 8:18 AM, Ernst, Craig S.
<ERNSTCS at uwec.edu>
wrote:
For Casper...I just check the b
ox in the management preferences not sure about for Casper but for normal login hooks to work you need to
activate login hook for the root loginwindow.plist
Criss Myers
Senior Customer Support Analyst (Mac Services)
Apple Certified Technical Coordinator v10.5
LIS Business Support Team
Library 301
University of Central Lancashire
Preston PR1 2HE
Ex 5054
01772 895054
>>> On Thu, Jan 22, 2009 at 12:31 PM, in message
<ec2e75ff0901220431v16ef1bdfi1dddb70e39e3ad68 at mail.gmail.com>, Miles
Leacy <miles.leacy at themacadmin.com> wrote:
I believe for $3 and login policies in general to work, you need to
check "Create Login/Logout Hooks", "Log IP/Username with Login/Logout
Hooks" and "Check for Policies with Login/Logout Hooks" in Management
Preferences, which is found in the Management tab.
----------
Miles A. Leacy IV
Certified System Administrator 10.4
Certified Technical Coordinator 10.5
Certified Trainer
Certified Casper Administrator
----------
voice: 1-347-277-7321
miles.leacy at themacadmin.com
www.themacadmin.com <http://www.themacadmin.com>
On Thu, Jan 22, 2009 at 7:13 AM, Criss Myers
<CMyers at uclan.ac.uk>
wrote:
Hi,
Could you not just redirect the cache folder to the local HD on login
and then delete at logout,
i use WGM to redirect the Cache and fonts folder on login from a network
Home folder, to /tmp/ they then get deleted at logout,
A login hook could do the same,
Criss
Criss Myers
Senior Customer Support Analyst (Mac Services)
Apple Certified Technical Coordinator v10.5
LIS Business Support Team
Library 301
University of Central Lancashire
Preston PR1 2HE
Ex 5054
01772 895054
>>> On Thu, Jan 22, 2009 at 4:31 AM, in message
<fc.000f4ccf02026db3000f4ccf020234f6.2026dea at phrd.ab.ca>, "Gene
Anderson" <ganderson at phrd.ab.ca> wrote:
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
_______________________________________________
Casper mailing list
Casper at list.jamfsoftware.com
http://list.jamfsoftware.com/mailman/listinfo/casper
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://list.jamfsoftware.com/pipermail/casper/attachments/20090122/613afc75/attachment.html
More information about the Casper
mailing list