• Mac OS X,  Mac Security

    Making My NAS Work in Lion

    Netatalk seems to always have some issue with OS X. Why I still use little NAS boxes for this that and the other is beyond me. I got stuck dealing with this for a little while and if you’re using Netatalk w/ a DHCAST128 UAM you probably will too. For more on DHCAST see the Netatalk page on UAM support. Kerberos and DHX2 are arguably better, but I’ve found they don’t always work right on some of my NAS boxes. This wasn’t just a quick defaults command as it was in previous instances. It’s not much of a script but the following should fix it if you’re having this issue…

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

    Saved Application States in Lion

    Every new feature comes with its own troubleshooting as most will, if only eventually, have problems. Lion comes with a cool new feature where the state of each application is saved and when the application is re-opened the windows are just as you left them when closed, even in the same positions on the screen. This can be pretty useful with something like Terminal, where I often don’t restart the app for long periods of time because I want to see my recent history across multiple sudo’d users. When you open Terminal, the previous commands are grey, but there. But I’ve run into a few instances where an application crashed…

  • Mac OS X,  Mass Deployment

    Airport becomes Wi-Fi in Lion

    If you run networksetup and do a -listallhardwareports in OS X Snow Leopard, you’ll see that the Hardware Port: for en0 (on an MBA at least, but you should get the point even if it’s a MacPro) is AirPort. If you run the same command in Lion, you’ll notice the the hardware port is now Wi-Fi. This change cascades to any commands like -listpreferredwirelessnetworks where the hardware port might get called on. For most of my scripts for assigning AirPort networks, etc I was able to mostly just find-and-replace AirPort for Wi-Fi, provided I didn’t use AirPort anywhere else (e.g.$AirPort, etc).

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

    Imaging and OS X Lion Recovery Partitions

    The Recovery Partition that comes in Lion seems to be getting in my way when I’m trying to build images. This was fixed in the latest build of DeployStudio (rc127) but, given that my DeployStudio, Casper Imaging Server and SIU environments act as my recovery partition for the most part, I just tossed it. If you do remove the recovery partition then you won’t be able to use FileVault. If that’s not an issue, first get the disk identifier: diskutil list When you see the entry, which should look something like disk0s4 (in fact that’s what I’ll use for this example), then remove it: diskutil eraseVolume HFS+ UntitledBlob /dev/disk0s4 If…

  • Mac OS X,  Mac Security,  MobileMe

    SMIME in OS X Lion

    In a previous article I showed how to get and install an SMIME certificate. Now let’s look at installing it into Mail. It’s really, really hard. First, open Mail. Then, click on the Mail menu and select Preferences. Then click on Accounts. Then click on the account you got an SMIME cert for. Then, in the TLS box, select the certificate you want to use. Next, go to compose a new message. You will see the little disclosure triangle to the left of the From dialog. Click on it and then check the box for the lock and the icon to the right of that, meant to look like a…

  • Mac OS X,  Mass Deployment

    Get Your Library Folder Back from the Lion

    In OS X Lion, user libraries (~/Library) are hidden. If you want to make it visible, use chflags. To use chflags to hide a file, simply type chflags followed by hidden and then the folder. For example, let’s say you wanted to hide your ~/Library folder before you compiled a new copy of an operating system. Just run the following to hide it (or re-hide it once you provde you can unhide it): chflags hidden ~/Library And then let’s say you wanted to unhide it ’cause you realized that it’s one of those folders best left visible: chflags nohidden ~/Library You can also use the SetFile command (both are located…

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

    Profile Manager, mdmclient and profiles in OS X Lion

    I wrote an article awhile back, looking at profiles from iPhone Configuration Utility. In Lion, the Profile Manager service can be used to create profiles that can be pushed to OS X or iOS clients. Clients can install profiles by going to a web page or they can be deployed using scripts. Once installed, mdmclient, a binary located in /usr/libexec will process changes such as wiping a system that has been FileVaulted (note you need to FileVault if you want to wipe an OS X Lion client computer). /System/Library/LaunchDaemons and /System/Library/LaunchAgents has a mdmclient daemon and agent respectively that start it up automatically. To script profile deployment, administrators can add…

  • Active Directory,  Mac OS X,  Mac OS X Server,  Mass Deployment,  Windows Server

    Using DFS in OS X Lion

    DFS stands for Distributed File Sharing. DFS is most commonly used to virtualize the way with which storage is presented to users. Once virtualized, mounts are able to replicate to one another or be moved between servers without impacting the end user experience. While many who have never used DFS will wonder why enterprises actually care about it, those of us who have used it extensively will be stoked that this new feature has been incorporated into OS X Lion. Using DFS in OS X is similar to using DFS in Windows, simply connect to a share and the work on the back end to locate where the share is…

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

    Directory Services Scripting Changes in Lion

    opendirectoryd Scripting directory services events is one of the most common ways that the OS X community automates post-imaging tasks. As such, there are about as many flavors of directory services scripts are there engineers that know both directory services and have a little scripting experience. In OS X Lion, many aspects of directory services change and bring with them new techniques for automation. The biggest change is the move from DirectoryService to opendirectoryd. In Snow Leopard and below, when you performed certain tasks, you restarted the directory services daemon, DirectoryService. The same is true in Lion, except that instead of doing a killall on DirectoryService, you do it on…

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

    The OS X Application Layer Firewall Part 3: Lion

    In a couple of previous articles I looked at automating the Application Layer Firewall in OS X. These are pretty common articles that get back-linked to the site, so I decided to update them earlier, rather than later, in the Lion release. The tools to automate firewall events from the command line are still stored in /usr/libexec/ApplicationFirewall. And you will still use socketfilterfw there for much of the heavy lifting. However, now there are much more helpful and functional options in socketfilterfw that will allow you to more easily script the firewall. Some tricks I’ve picked up with alf scripting: Configure the firewall fully before turning it on (especially if…