Sporkmonger

purveyor of fabulously ambiguous eating utensils

Tip: Require password to restart OS X

Posted by sporkmonger
Written January 16th, 2008

So, last week I was running this ridiculous database migration for importing WordNet into MySQL via ActiveRecord. (I would like to file a complaint by the way. If a migration takes 8 days to finish, you need to use something other than ActiveRecord to get stuff into the database. Seriously.)

A family member decided they would like to watch a TV show on my laptop. Fairly normal. Unfortunately, my PowerBook decided to act up and wouldn’t play any sound. Still not sure what the deal is with that, it’s happening off and on. Only thing that fixes it is a reboot. Well, the family member in question took it upon themselves to reboot while my migration was in progress and about 98% done. For those of you reading this in horror, don’t worry, I hacked on the migration code for about 20 minutes and got it to resume where it left off.

That said, I decided I didn’t want that ever happening again. The obvious solution was to check off the little checkbox in System Preferences -> Security for “Require password to shutdown or reboot”. Except that it doesn’t exist. Apple? Are you listening? I’d like to be able to remind users of my computer that they really need to ask me before rebooting my computer. Anyways. Here’s how to do it without the handy checkbox:

Create a new user on your machine. Regular old user, no admin access. Name it “Lockdown”. Give it a lightning bolt icon or something. Enable fast user switching. Log in to your account as normal, then once you’re logged in, switch to the Lockdown account. Sign it in, leave it running, then switch back. Now OS X will require a password before rebooting.

It’s a hack, and there’s no really good reason to leave it running all the time, but it’s a good idea if you’ve got an important process going that you really don’t want getting killed off accidentally by well-meaning family members. And yes, they could still hit the power button or pull the battery on the laptop, but that’s a lot harder to do accidentally.