Category Archives: Mac OS X

Mac OS X Mac OS X Server

Roundcube for OS X Server

The latest Roundcube installer for OS X Server is now available at http://topicdesk.com/downloads/roundcube. This update, which provides a pretty awesome WebMail interface to OS X Server’s Mail Service provides the following:

  • One installer that supports all Mavericks and Yosemite
  • Roundcube WebMail 1.0.3 installed as a WebApp
  • Automatically Configured Plugins
  • Roundcube CardDav: Server-based address books
  • Roundcube Managesieve: Server-side mail filtering and vacation messages
  • PHP and Roundcube Config automatically configured for a typical Mac installation
  • sqllite database – we no longer use Postgres
  • Integration with the Mail Service running on OS X Server
Mac OS X Mac OS X Server Mac Security Minneapolis

Reboot Your Own Machine At MacMiniColo

Even a Mac needs to be rebooted sometimes. If you host a computer at Mac Mini Colo, it’s pretty easy to reboot. To reboot your system, log into your account with MacMini Colo.
Screen Shot 2014-12-10 at 8.56.40 AM
Once logged in, click on Computers and then click on the computer that you’d like to reboot. Then click on the Reboot button and confirm the reboot.

Screen Shot 2014-10-03 at 8.55.54 AM

Mac OS X Mac OS X Server Mac Security Mass Deployment Network Infrastructure

Simple Preflight and Sanity Checking in Scripts

I was recently building some preflight scripts and was looking to record some information about a machine live, before proceeding with a script. I found the cheapest way to determine information about architectures and chipsets when scripting preflight scripts for OS X to be the arch and machine commands respectively. For example, to verify the architecture is i386, use the arch command with no options:

/usr/bin/arch

Which simply outputs “i386”:

i386

To check the machine type, simply use the machine command:

/usr/bin/machine

Which outputs as follows:

x86_64h

Mac OS X Mac OS X Server

Scripted Country Geolocations Using OS X’s Built-In ip2cc

Recently I was working on a project where we were isolating IP addresses by country. In the process, I found an easy little tool built right into OS X called ip2cc. Using ip2cc, you can lookup what country an IP is in. To do so, simply run ip2cc followed by a name or ip address. For example, to lookup apple.com you might run:

ip2cc apple.com

Or to lookup Much Music, you might run:

ip2cc muchmusic.ca

The output would be:

IP::Country modules (v2.28)
Copyright (c) 2002-13 Nigel Wetters Gourlay
Database updated Wed May 15 15:29:48 2013

Name: muchmusic.com
Address: 199.85.71.88
Country: CA (Canada)

You can just get the country line:

ip2cc apple.com | grep Country:

To just get the country code:

ip2cc apple.com | grep Country: | awk '{ print $2 }'

Finally, ip2cc is located at /usr/bin/ip2cc so we’ll complicate things just a tad by replacing the hostname with the current IP (note that private IPs can’t be looked up, so this would only work if you’re rocking on a wan ip or feeding it what a curl from a service like whatismyip brings back):

ip2cc `ipconfig getifaddr en0` | grep Country: | awk '{ print $2 }'

Mac OS X Mac OS X Server Mac Security Mass Deployment Network Infrastructure Programming Ubuntu Unix

Opposite Day: Reversing Lines In Files

The other day, my daughter said “it’s opposite day” when it was time to do a little homework, trying to get out of it! Which reminded me of a funny little command line tool called rev. Rev reads a file and reverses all the lines. So let’s touch a file called rev ~/Desktop/revtest and then populate it with the following lines:

123
321
123

Now run rev followed by the file name:

rev ~/Desktop/revtest

Now cat it:

cat !$

Now rev it again:

rev !$

You go go forward and back at will for fun, much more fun than homework… Enjoy!

Mac OS X Mac OS X Server Mac Security Mass Deployment

Refresh OS X CRLs

I recently found an existing image with a lot of stale crl information. We couldn’t rebuild the image, so we decided to instead refresh all of the crl information. This information is stored in /var/db/crls/crlcache.db. Deleting the file turned out to be problematic so we needed to clear items out of the tables instead. While this could be done using a few different tools, it turns out there’s a command built into os x to take care of this process for us called crlrefresh.

To use crlrefresh to clean up stale crlinformation and fetch new crlinformation for all CRL and certificates, use:

crlrefresh rpvv

Mac OS X Mac OS X Server Mac Security

See How Long The Active User Has Logged In On A Mac

The following will grab you an integer of the number of hours an active user has logged into a computer:

user=$( ls -l /dev/console | awk '{ print $3 }' ) ; ac users $user | awk '{ print $2 }'

 

iPhone Mac OS X Mac OS X Server Mac Security

Casper 9.62 Is Out!

Casper 9.62 is now out! And holy buckets, look at all the stuff that got fixed in this release:

Casper-Suite-9.62-Release-Notes_320_414_84_1416419790

http://resources.jamfsoftware.com/documents/products/documentation/Casper-Suite-9.62-Release-Notes.pdf?mtime=1416856726

PS – There’s also some api improvement goodness!

Mac OS X

Quick-Tip: Menu Items Modifier Keys In OS X

A modifier key is a key that when held in combination with another key, causes a unique behavior. For example, Command-c copies highlighted data to your clipboard. The Finder modifier keys are pretty well documented. But a number of menu items support modifier keys as well. For example:

  • Click on the Dropbox item in your menu, you’ll be able to see the status of files that have sync’d as well as a cogwheel with the typical settings for an app like Dropbox. Option-click on the Dropbox menu item, you’ll see the items under the cogwheel menu.
  • Option-click the Wi-Fi menu item to see extended Wi-Fi information.
  • Option-click Bluetooth, you’ll see version and MAC address information for your bluetooth interface (note that the extended options are usually greyed out/informational).
  • Option-click on the sound menu item and you can switch input and output devices (these extended options are actually shown as you can switch between things).
  • Option-click AirPlay and you get, well, the same menu. So not all support extended information and options.
  • Option-click Go to see Library.
  • Option-click the Menu menu to see shift modifier keys to access All options (this actually works on a lot of menus such as Finder, File and Edit, but even within some apps).
  • Option-click on the Notifications menu item and you disable Notification Center.

Screen Shot 2014-12-01 at 8.15.03 PM

But my favorite, for Apple apps, if you command-click on items, you can just drag them out of your menu. This saves you from firing up System Preferences and unchecking the box to remove them from the menu.

iPhone Mac OS X Mac OS X Server Mac Security

MacVoices Podcast With Chuck Joiner About The New Take Control Of OS X Server Book!

Yay, podcasts! Chuck Joiner was kind enough to have me on MacVoices. We did a show, now available at http://www.macvoices.com/macvoices-14223-charles-edge-helps-take-control-os-x-server

Or if you’d like to watch on YouTube or inline:

http://youtu.be/AeccoRqIrgc