• Mac OS X Server

    Nuke+Pave iCal Server in Lion Server

    It is possible to remove all of the content from a Lion Calendar server using Postgres. To aid you in doing so, Apple has built out a couple of commands to make the process easier. This will nuke everything from the server and so is not something that should be lightly done. To do so, first stop the Calendar service in the Server application. Then let’s back up the database: pg_dump -U _postgres caldav -c -f /db_backups/caldav.sql Then run dropdb to remove the database itself: dropdb -U _postgres caldav Once the database is gone, run the calendar_bootstrap_database script (I prefer doing so verbosely): calendarserver_bootstrap_database -v Now you should be able…

  • Mac OS X,  Mac OS X Server,  Mac Security

    Setting Up Open Directory Replicas With Lion Server

    In Lion Server, Open Directory can be managed in one of three ways: using the Server application the Server Admin application or using the command line utilities. Configuring Open Directory has never been easier than it is in the Server application, though. As we looked at in a previous article, setting up an Open Directory master should be done using the Server application. But setting up an Open Directory replica should be done using the Server Admin application. The Server Admin application is not installed when you buy OS X Server on the App Store and so it can be obtained here. But first (or while that’s downloading even), open…

  • iPhone,  Mac OS X,  Mac OS X Server,  Mac Security,  Mass Deployment

    Podcasting in Lion Server

    There have been a number of articles on using the Podcast Producer service in Snow Leopard and previous operating systems. The Podcast Producer service itself in Lion remains unchanged. It still needs shared storage (e.g. NFS, Xsan, etc), Xgrid, Kerberos (for Xgrid) and while seeming to sit atop a house of cards, is one of the coolest and most complex services in Mac OS X Server. But there have been a lot of environments where Podcast Producer seemed out of reach where it shouldn’t have. If you have a single server, why do you need shared storage, a truly scalable grid computing cluster and all that complex workflow goodness at…

  • Mac OS X,  Mac OS X Server,  Mac Security,  Mass Deployment

    Pentesting Mac OS X Server With Nessus 5

    One of my favorite tools for penetration testing is Nessus from Tenable Network Security. Nessus 5 is the latest release in the family of vulnerability scanners that is probably amongst the most prolific. Nessus 5 does discovery, configuration auditing, profiling, looks at patch management and performs vulnerability analysis on a variety of platforms. Nessus can also run on a Linux, Windows or Mac OS X and can be used to scan and keep track of vulnerabilities for practically any platform, including Mac OS X. To install Nessus, go to the Nessus site and click on the Download button, around the middle of the page. Agree to the download agreement and…

  • Mac OS X Server

    Restarting PresSTORE Services

    A number of PresSTORE backup servers also provide other services in the environments they are installed in. Therefore, restarting PresSTORE services without restarting the host that runs the PresSTORE services can be done via the command line so that you don’t have to restart the server that is doing backups. To stop the PresSTORE server agent, use the stop-server command stored in /usr/local/aw: sudo /usr/local/aw/stop-server To the restart the server, use the start-server command, stored in the same location: /usr/local/aw/start-server The restart can also be done as a different user by invoking the -u operator followed by (and therefore defining) a user. The server occasionally stops itself for internal housecleaning,…

  • Mac OS X,  Mac Security

    lsregister: How Files Are Handled in Mac OS X

    The lsregister command is used to query and manage the Launch Services database, or the database that is used to determine the default application used to open files of various types. lsregister is part of Core Services, and stored in /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support. To see the options available to lsregister, run the command with no operators: /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister You can dump the database to the screen using the -dump option: /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister -dump You can then grep the database or redirect the output into a text file for parsing: /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister -dump > dump.txt Sometimes applications don’t open with a given file type. When this happens, you can quickly and easily check if the problem…

  • Mac OS X,  Mass Deployment,  Microsoft Exchange Server,  Windows Server

    How Exchange's Autodiscover Works With Mail.app

    Autodiscover automatically configures profile settings for Exchange clients. These clients include Microsoft Outlook 2007 or Outlook 2010, Outlook for Mac, Mail.app in Mac OS X, iPhone, iPad and ActiveSync enabled phones. Autodiscover is often made out to be complicated. There’s an Autodiscover service that gets installed when a Client Access Server (CAS) role is setup for Exchange 2010 in the form of a default virtual directory named Autodiscover for the default Web site in Internet Information Services (IIS). You then forward an autodiscover service locater record in DNS in the form of _autodiscover._tcp. The virtual directory handles Autodiscover requests. But what about other vendors, and even for Exchange, how do…

  • Business,  Mac OS X,  Mac OS X Server,  Mac Security,  Mass Deployment,  public speaking,  Time Machine

    My New Book on Time Machine Now Available

    I have published a new book on Time Machine (Time Capsule, deployment/Managed Prefs and Time Machine Server as well). I wrote it months and months ago and it finally ended up getting posted (publishing is a weird world like that sometimes). It is available for Kindle (Amazon) for now and should be up on the iBooks store as soon as the good people from iTunes Connect get back from their holiday break. To quote the Amazon excerpt: Time Machine is Apple’s built-in backup solution that comes bundled with Mac OS X. In this book, we will explore Time Machine, looking at how to enable Time Machine, configure what to back…

  • Mac OS X

    Opening a Terminal Window From, Well, Terminal

    Terminal is a great application. And we usually use Terminal for editing scripts and invoking things. But what about invoking Terminal from, well, Terminal. For starters, let’s look at opening a Terminal session to the root of the boot volume (aka /): open -a Terminal / The -a option, when used with the open command, allows you to define which application that the item defined in the following position will open in. For example, you could open an XML file in Xcode open -a Xcode /usr/share/postgresql/pg_hba.conf.sample You could then open Terminal by passing other commands into the command. For example, to open a new Terminal window to the current working…

  • Mac OS X

    Disable New Window Animations in Lion

    New windows in Lion have an animation, by default. With older systems, this can cause issues in other applications and disabling the feature (as cool as it may be) can help to remediate that problem. To do so: defaults write NSGlobalDomain NSAutomaticWindowAnimationsEnabled -bool NO To then turn them back on: defaults write NSGlobalDomain NSAutomaticWindowAnimationsEnabled -bool YES