[Casper] Script to remove old accounts or home directories?
Ernst, Craig S.
ERNSTCS at uwec.edu
Fri May 29 08:07:06 PDT 2009
We clean out home directories nightly in labs with a self-deleting startup item that triggered to run as a policy. This is something you need to be very careful with.
1. We have a package that we only install at image time to the systems that are suppose to use it so if for any reason the policy is called to trigger it it won't do anything.
2. The policy copies the startup item out of the packages location into the correct location and verifies permissions are correct.
3. The system is scheduled to reboot 5 minutes later when it has prompted any logged on users.
4. The reboot runs the startup item that moves to a temp location any folders in Users you wish to keep like Shared, or other specified accounts
5. The script then deletes the remaining items in Users
6. The script movies back the desired folders it put in temp
7. The script then deletes the startup item itself
So this works if you already know what the local accounts are as you can define that in the script. There may be a more graceful way then moving them all. I can send you the package I have if you like.
Craig E
On 5/29/09 8:52 AM, "Weber, Jason" <Jason.Weber at district196.org> wrote:
Throwing another post out here..
Kind of following the last post referring to a training lab.. In this lab the computers will also be bound to AD, but will not be making a 'Mobile' account. However even though there is no permanent account created, there is an individual user home directory created that is not deleted once the user logs out.
Since this is a training lab, it would be nice to have those home directories cleaned out after the user has left. Does anyone have a good way on how to remove those AD home directories once a user has logged out, but not touch the local accounts created on these machines?
Jason Weber
Technology Support Cluster Specialist
Independent School District 196
jason.weber at district196.org
(651)-423-7974
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://list.jamfsoftware.com/pipermail/casper/attachments/20090529/b9bcbf7b/attachment.htm
More information about the Casper
mailing list