Trying to keep the Users folder from getting cluttered.
April 17, 2008 12:41 PM   Subscribe

How can I keep the Users folder tidy in Leopard?

I work at a university where we're moving towards having users login with their Active Directory accounts on Leopard workstations for the first time. We're hoping to keep the Users directory on these workstations clean. We've setup a nice default profile that works wonderfully, now we just want to be able to delete the user's folder after they logout. (we can't do a nightly cron job, folks have 24 hr access to these machines)

We were looking at Bombich's LoginWindow manager, but it doesn't seem to work in Leopard. From what I can tell, Bombich has ceased development on it.


I have a tidy little perl script that will delete all but the admin user's home folders. I figure I just need some way of triggering it with the appropriate permissions

I'm not great with Apple stuff, so I may just be approaching this in the completely wrong way - I'm certainly open to any and all suggestions.
posted by soplerfo to Computers & Internet (5 answers total)
 
No Apple-specific advice, but what about a minor tweak to your perl script to delete profile folders older than 24 hours? That could run as a nightly (daily, whateverly) cron job without affecting the currently logged-in user.
posted by pocams at 12:48 PM on April 17, 2008


Best answer: Here's a discussion thread about setting up a system-wide logout hook. In a nutshell:
sudo /usr/bin/defaults write com.apple.loginwindow LogoutHook /path/to/script
posted by xil at 12:52 PM on April 17, 2008


Launchd and Lingon might be what you're looking for.
posted by infinitewindow at 1:23 PM on April 17, 2008


Response by poster: I think xil might have it! I'd played with com.apple.loginwindow but I think I had something backwards - I'll report back after more testing tomorrow. Thanks!
posted by soplerfo at 3:02 PM on April 17, 2008


Response by poster: Thanks xil - works perfect!
posted by soplerfo at 9:46 AM on April 18, 2008


« Older What to do in Ontario??   |   Where are the used book stores in Houston? Newer »
This thread is closed to new comments.