Tiny Deathstars of Foulness

The Server app is great. But when you go making changes to some things, you’re just going to cause problems. I know, you’ve been told that host name changes and IP changes are all kinds of OK at this point; “look, Charles, there’s a button!” Well, go ahead, click it. Don’t mind me, you might just be alright. But then again, you might not…

And when you’re not, you’re likely going to be restoring some stuff from backup. But just before you do that restore, let’s try one more thing. Let’s try and rebuild some certificates and configuration settings that shouldn’t impact actual service operation. Let’s try to reset and let a fresh install of the Server see if it can fix issues.

Now, I want to be clear, this is the last resort before restoration. I’ve had a lot of luck with services remaining functional and preserving settings when I do this, but don’t expect that. Basically, we’re going to do what we looked at doing back in ’09 with AppleSetupDone┬ábut one designed just for servers, so the file is in the same place (/var/db) and called .ServerSetupDone. To remove it:

sudo rm /var/db/.ServerSetupDone

Good luck and hope it at least buys you a few hours for people to stop chasing you with pitchforks, long enough to grab a power nap before you clean install the box…

August 22nd, 2012

Posted In: Mac OS X Server

Tags: , , ,

  • c kizer

    Best Tip Ever. Between using a “beta” version of server, and upgrading to 10.8.1, the server app was literally beachballing my entire machine trying to do some strange stuff with DNS lookupD, your trick fixed that!

    • Yay! Glad I could help (I had the same thing happen between betas and 10.8.0).

  • I saw in a post about Lion Server you detailed a way to deprecate the servers status as an Open Directory server, using “sudo slapconfig -destroyldapserver”. Do you advise doing this with Mountain Lion Server as well.

    My problem is I am trying to reset the server but when run the command you list above, after reinstalling it, the DNS and Open Directory status lights automatically come on. Is there something I am missing here?


  • Robb Aley Allan

    Or just remove the Server app from the Applications folder.

  • Amazing tip! Fixed an issue where, after migrating from my old server running Lion server, I couldn’t login to at all. You saved me hours!