Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have a set of MacBook Pros which students will be using. I want to create a user which automatically logs in and resets back to it's defaults next time they log back in. In Windows land I'd make a mandatory profile.

What's the best way to go about this?

share|improve this question

3 Answers 3

up vote 1 down vote accepted

You can create a LoginHook script to reset the user's home folder on every login. Mike Bombich has some example scripts, including one that simply resets an account every login, and one that resets but saves the old home folder to /tmp in case you need to recover previous work. You'll probably want to edit the script a bit to change which user(s) are affected (the first only resets if the account name is "student", the second for anything except "admin"), and maybe what it uses as a template for the reset account (by default, both use the standard system template, /System/Library/User Template/English.lproj -- you can customize this folder to taste, but it's also what gets used for newly created accounts, so you might want a separate template for the reset account). Be a bit careful with this script, as it'll run as root before each login session for ALL users -- if you get it too seriously wrong, it could wipe your account as well and/or keep you from logging in at all.

To enable the LoginHook, use

sudo defaults write com.apple.loginwindow LoginHook /path/to/loginhook/script

and then use the regular Accounts preferences to set automatic login to that account, and you should be set.

share|improve this answer

Deep Freeze would be perfect for this application.

  • Allows passwords (guest does not)
  • Allow full access to everything, including installing software / editing permissions / etc. (guest does not)
  • Create a perfectly clean image that is restored when the computer is restarted. You don't have to worry about anything being left or broken. They run a sudo rm -rf /? Reboot and it is fixed. Installed a bunch of crap? Reboot and it's fixed.
share|improve this answer
    
Nice solution, unfortunately zero budget. –  mattdwen Aug 5 '10 at 4:01
    
@matt: For $45 it is worth every penny. Even if you have to pay out of pocket it the solution for this. –  Josh K Aug 5 '10 at 15:35

You can use a Guest account. A Guest account allows a user to log in, but the guest's files are removed when he logs out. A Guest account can't have a password, though.

share|improve this answer
    
Here is a link with a lot of info on customizing the Guest account. macosxhints.com/article.php?story=20080205095429448 –  crazysim Aug 5 '10 at 1:55
    
Guest account is a bit too restrictive. The main software they're using is Adobe Lightroom, which licenses per user. I can't find where it stores the serial number, so every time Guest logs out and back in, Lightroom needs licensing again. Also, using Workgroup Manager, the Guest account doesn't show up? It's enabled, and I've logged in as it, but I can't configure it. I've instead created a standard account, and I'm locking it down as much as possible using Workgroup Mananger. –  mattdwen Aug 5 '10 at 4:06

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.