• 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,  Mac OS X Server

    Mac OS X: Command Line Disk Management

    Now that you are looking at a command prompt on the target server use the diskutil command to prepare the hard drives for installation.  As with the Disk Utility application, double (nay, triple) check your drives to make sure that either they are backed up or you absolutely positively do not need any of the data they contain, or you will not ever likely see your data again (my precious).  When you run diskutil list you will see a listing of all partitions on your disk as can be seen below:    #:                       TYPE NAME         …

  • 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

  • Xsan

    Xsan: umask and Default Permissions

    I originally posted this at http://www.318.com/TechJournal By default the global permissions for new files written into an Xsan volume are 644 (rw-r–r–). This can result in a permissions problem where one user can read another user’s posted items, but not make changes to it.  This can be resolved by changing the default umask value for groups. It’s a simple command line: sudo defaults write -g NSUmask 23 In this case, the 23 is a decimal equivalent of “rw-”. So the result of running this command line is that files posted to the shared volume will have 664 permissions (rw-rw-r–), allowing other users in the group to modify the files. Note…

  • Mac OS X

    Script to Clear the SideBar Prefs

    Here’s a quick little script you can push out to a system having SideBar issues, to clear the prefs.  Alternately you can throw the rm command itself into ARD as a support mechanism… #!/bin/bash rm ~/Library/Preferences/com.apple.sidebarlists.plist exit 0

  • Mac OS X

    vm_stat

    The vm_stat command in Mac OS X will show you the free, active, inactive, wired down, copy-on-write, zero filled, and reactivated pages for virtual memory utilization. You will also see the pageins as well as pageouts. If you wish to write these statistics routinely then you can use the vm_stat command followed by an integer. For example, to see the virtual memory statistics every 5 seconds: vm_stat 5

  • Mac OS X,  Mac OS X Server

    Finding Things on Mac OS X

    Mac OS X has a number of commands that will help you find things.  There’s find, grep and way more.  But the easiest of them all to use is locate.  To run locate simply type the word locate from within terminal followed by the case sensitive string of what you are looking for.  For example, if you want to find all files with the word Krypted in the name use the following command: locate Krypted Keep in mind when using the locate command that it will also find files that have the name in the path, so if I have a folder called Krypted, every single file in that folder…