Skip navigation

Need Script to Delete Non-Admin Accounts upon Logout

2657 Views 3 Replies Latest reply: Aug 2, 2012 5:14 AM by bluecluee RSS
ipanacea Calculating status...
Currently Being Moderated
Feb 29, 2012 11:16 AM

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
  • Glenn Leblanc Level 5 Level 5 (5,935 points)
    Currently Being Moderated
    Feb 29, 2012 11:39 AM (in response to ipanacea)

    I know in Lion there is a guest account. When users log out, it deleted there information. I'm not sure if SL has the same features, but you may want to look into that as an alternative.Screen Shot 2012-02-29 at 1.37.26 PM.png

  • bluecluee Calculating status...

    Thanks so much thats a huge help!

Actions

More Like This

  • Retrieving data ...

Bookmarked By (0)

Legend

  • This solved my question - 10 points
  • This helped me - 5 points
This site contains user submitted content, comments and opinions and is for informational purposes only. Apple disclaims any and all liability for the acts, omissions and conduct of any third parties in connection with or related to your use of the site. All postings and use of the content on this site are subject to the Apple Support Communities Terms of Use.