Is there a way to fix home folder permissions remotely?

Trying to keep the Users folder from getting cluttered.

  • 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 http://www.bombich.com/software/lwm.html, 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.

  • Answer:

    Here's a http://discussions.apple.com/thread.jspa?messageID=6891519 about setting up a system-wide logout hook. In a nutshell: sudo /usr/bin/defaults write com.apple.loginwindow LogoutHook /path/to/script

soplerfo at Ask.Metafilter.Com Visit the source

Was this solution helpful to you?

Other answers

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.

pocams

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!

soplerfo

Thanks xil - works perfect!

soplerfo

Related Q & A:

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.