• Mac OS X,  Mac OS X Server,  Unix

    Creating Directories Using -p with mkdir

    I was helping someone out the other day and was VNC’d into their server watching them work.  I asked them to make a directory about 5 levels deep into the file system.  They proceeded to make each directory one by one using mkdir.  When they were done, I actually removed them all so I could spend a second to show them how to do so much quicker…  Let’s say the directory you need created is /tmp/usr/tmp.  Rather than using 3 mkdir commands and cd’ing in between it would actually behoove one to go about using the -p option with the mkdir command.  To make this directory structure you could actually…

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

    Mac OS X: What is Open Directory?

    Technically speaking, Open Directory is an LDAP database that can be used to store information about users, contacts, computers, groups (of all of the above) and other devices.  The reason we do not call Open Directory LDAP is that it also has other components.  These include Kerberos for single sign-on, SASL for integration with other services and password server, to keep the passwords you use secure.

  • Mac OS X Server

    Mac OS X Server: Changing IP Addresses

    Unlike many flavors of the *nix beast you do not want to change the IP address of a Mac OS X Server without thinking it through very carefully first.  The IP address that you used when you initially set the system up is the one it would prefer to use for the rest of its life if it were left to its own devices. If you do insist on changing the IP address it’s usually best to do so before you configure services.  If you can’t then you can change the IP address with services running but prior to doing so please make sure to perform a clone of your…

  • Mac OS X Server

    Mac OS X Server: Sharing Files from the Command Line

    Mac OS X Server provides the sharing command.  You can create, delete and augment information for share points using sharing. To create a share point for AFP you can use the following command: sharing -a <PATH> -A <NAME> So let’s say you have a directory at /Shares/Public and you want to create a share point called PUBLIC.  You can use the following command: sharing -a /Shares/Public -A PUBLIC Now, the -a here will create the share for AFP but what if you want to create a share for other protocols?  Well, -F does FTP and -S does SMB.  Once created you can disable the share using the following command: sharing -r PUBLIC…

  • Mac OS X Server

    CLI: Get and Set Mac OS X Server Serial

    You can use the serversetup tool in /System/Library/ServerSetup/ to set the serial number for a Mac OS X Server.  Provided the ServerSetup directory is your working directory you can then use the serversetup tool to configure the serial number ./serversetup -setServerSerialNumber “XSVR-105-000-N-xxx-xxx-xxx-xxx-xxx-xxx-x|Charles Edge|318” Once the serial number has been set you can then get the serial number using the following command no matter the working directory: /System/Library/ServerSetup/ -getServerSerialNumber

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

    Mac OS X Log Analysis

    Mac OS X has a lot of options for logging data. But these options can actually cause a lot of white noise. So there are two tools that you should look at if you’re interested. The first is Splunk: http://www.splunk.com/LogAnalysis The second is Sawmill: http://www.sawmill.net