Need Script to Delete Non-Admin Accounts upon Logout
I have a number of units in a lab that I need to automate the removal of the /Users folder of all the non-admin accounts when the user logs out. They all authenticate via AD (except local admin) and the user account data is not cached so if the network connection is lost, they can't log in either way. In the past I've simply gone around and manually removed all the user account folders within the /Users folder, except the admin and the Shared folder. As you can imagine this gets to be a pain. I'm thinking this is possible with a logouthook?, but I can't find how best to tackle it. All units in question are presently on 10.6.8, but soon we'll migrate to 10.7.
Now, the cats a$$ of this would be to have the option to specify a timestamp, so say the user logs back in within 24 hrs because they forgot to save something to their flash drive, they still have that option, but after the initial 24 hour period, then the user folder gets deleted. I'll gladly take the former as opposed to the fancy at this point.
I thank all the help I can get in advance.
MacBook Pro, Mac OS X (10.7.3), 15" Core i7