Archive for the ‘Mac OS X Server’ Category

Leopard Server: New Managed Preferences

Wednesday, June 11th, 2008

If you’re familiar with Managed Preferences in Tiger then you’re basically already familiar with Managed Preferences in Leopard Server. But there are some great new features that Apple has provided us with by popular demand. These include the following:

Applications
There are now more features to the Applications Managed Preference. You can allow or disallow applications by selecting them individually or a folder. This means that you can allow access to applications located in the /Applications folder but disallow all applications located in the /Applications/Utilities folder. There are also now controls for allowing specific widgets and disabling Front Row.

Finder
There are new options to limit users from doing tasks when in the Finder such as Ejecting a disk, connecting to servers, rebooting and burning disks.

Login
You can now control the list of users that are displayed to a user during login times to show Mobile accounts and network users. You can show/hide the restart button, disable automatic logon, enable Fast User switching, set the local computer record name to the name of the computer on the server, enable guest access, control the inactive time to logout users and configure computer based Access Control Lists.

Mobility
Mobility now allows administrators to set an expiry for a users home folder on the system they are logging into. This allows administrators to keep local desktop systems from getting polluted with hundreds of home folders without using custom scripts to do so. Administrators can also now force accounts on local systems to use FileVault with Mobility accounts to keep data on local systems as secure as possible and set quota’s for user home directories. Finally, it is also now possible to control the path that the user home folder is located on local desktops.

Network
Administrators can now Disable Internet Sharing, Airport and Bluetooth for client computers.

Parental Controls
Hide profanity in the dictionary, control access to web sites, set the amount of time per day that a computer is allowed to be used and set times when login is not allowed in this new Managed Preference.

Printing
Force users to put their user name, date and/or MAC address in a page that is sent with each print job.

System Preferences
Allow or deny access to each System Preference (including the new ones).

A brief introduction to Mac OS X SandBox Technology

Thursday, April 17th, 2008

In all versions of OS X previous to Leopard, access control restrictions were limited to a security model referred to as Discretionary Access Controls (DAC). The most visible form of DAC in OS X is in it’s implementation of the POSIX file-system security model, which establishes identity-based restrictions on an object in the form of a subject’s user or group membership. Similarly Access Control Lists are a form of discretionary control, though they are far more extensible and discrete then the POSIX model. In such models,  newly created objects or processes inherit their access rights based upon those of the creating subject, so that any spawned objects are not granted access rights beyond that of their creating subject. The key idea behind the DAC model is that the security of an object is left to the discretion of the object’s owner; an object’s owner has the ability to assign varying levels of access control to that object within the confines of the DAC implementation. The DAC model has for decades been a staple in the management of both object/process creation and access across all mainstream computer systems due to it’s user-centric nature. However there is a persistent caveat in these implementations;  in all mainstream implementations of such models, there exists a superuser which has the capabilities to completely bypass access restrictions placed on objects. In POSIX-based Operating Systems such as Unix, Linux, or OS X, this superuser exists in the form of the root user. The existence of such a loophole presents a bit of a paradox. On one hand, it introduces several obvious security ramifications by providing capabilities to completely bypass the DAC model all together; any processes which are invoked by the superuser inherit the “god mode” access controls, they have free reign over the entire system. At the same time, the existence of the superuser account becomes a vital tool for the practical administration of data objects and system resources. In a perfect world, this wouldn’t necessarily be a bad thing. Unfortunately that’s not the world we live in, and it is not uncommon to hear about processes being hijacked for ill-will. If the compromised process has been invoked by the superuser, then the entire system has been compromised, including all user data with it. 

With 10.5 Leopard, Apple has introduced a new low-level access control model into their OS, based upon the mandatory access control (MAC) model. Conceptually, the MAC system implements restrictions based upon actors, objects, and actions. In such a system, the actor typically assumes the form of a process, thread, or socket. The object can be any type of resource, such as a file, directory, socket, or even a TCP/UDP network port, among others. The action is simply the request of the actor to be applied to the respective object, and varies depending on the type of object involved in the request. Referring back to the file system model; the actor would be a word processor, the object would be a .txt flat file, and the action would be a call to either read to or write to that text file. When the actor requests access to the object, the MAC authorization system evaluates security policies and decides whether the request can proceed, or if it should be prohibited. In a pure MAC model, the object or process ownership is not generally a consideration; individual users do not have the ability to override defined policy. 

Leopard enforces the MAC model via a new framework, architected from TrustedBSD’s MAC framework. This framework introduces “sandbox” access control capabilities which allow a developer or user to apply access control policies to a process, restricting privileges to various specified system resources. The restrictions are generally enforced upon acquisition, so any active file descriptors would not be immediately affected by any policy changes, however, any new open() operations would be subject to the new restrictions. In a fashion similar to the DAC model, new processes and forks will inherit the access restrictions of their parent. In Leopard, these restriction policies can be pre-compiled into any given program, or they can be applied to any executable at runtime. 

While Leopard’s MAC framework is based off of TrustedBSD’s,  it’s implementation deploys only a subset of control points provided by the TrustedBSD implementation. Noticeably absent are the majority of the Security Policy Modules available for TrustedBSD and FreeBSD implementations, such as Biba, MLS, or NSA’s FLASK/TE (implemented in SEDarwin), though perhaps some day we’ll see some of these ported to Leopard’s MAC framework.  For now, Apple has offered their own Security Policy Module dubbed “Seatbelt”, which is implemented as a KEXT installed at /System/Library/Extensions/seatbelt.kext.  As of 10.5.2, the feature set of Seatbelt seems to be very much in flux. The only documented way to apply these controls in code is via the sandbox_init() function. Utilizing this function in code provides a way for an application programmer to voluntarily restrict access privileges in a running program. sandbox_init() is very limited at this point, providing only 5 pre-defined constants: 

• kSBXProfileNoInternet  – disables TCP/IP networking.
• kSBXProfileNoNetwork – disables all sockets-based networking
• kSBXProfileNoWrite – disables write access to all filesystem objects
• kSBXProfileNoWriteExceptTemporary – disables write access to filesystem objects except /var/tmp and `getconf DARWIN_USER_TEMP_DIR`
• kSBXProfilePureComputation – all OS services are restricted

An application can utilize one of these constants to restrict capabilities in spawned processes or threads, minimizing the potential damage that can occur in the event that the process is compromised. Figure 1 shows an example implementation of the kSBXProfileNoWrite profile in code:

Figure 1.

#include
#include
#include
#include

int main()
{
int sb, fh;
char **errbuf;
char rtxt[255];
char wtxt[255] = "Sandboxed you aren't\n\n";

// init our sandbox, if we don't return 0 then there's a problem
sb = sandbox_init(kSBXProfileNoWrite, SANDBOX_NAMED, errbuf);
if ( sb != 0 ) {
        printf("Sandbox failed\n");
return sb;
};

fh = open("test.txt", O_RDONLY);
if ( fh == -1 ) {
perror("Read failed");
} else {
read(fh, rtxt, 255);
close(fh);
printf("FileContents:\n %s\n", rtxt); 
};

fh = open("test.txt", O_RDWR | O_CREAT, 0000644);
if ( fh == -1 ) {
perror("Write Failed");
} else {
write(fh, wtxt, strlen(wtxt));
close(fh);
printf("Successfully wrote file!\n");
}

return 0;
}

Compiling and running this code returns the following results:
% ./sandBoxTest
FileContents:
 hello              

Write Failed: Operation not permitted

So, even though our POSIX permissions allows for read/write access to the file, the sandbox prevents it, regardless of user. Running the program even with root privileges yields the same results. 

Currently, the options provided by Apple are very all-or-nothing, particularly in the area of file system restrictions. In this way, Seatbelt acts more as a clumsy broadsword, lopping off functionality in large chunks at a time for the sake of security. In this form, Seatbelt has minimized use outside of very vertical applications or the increasingly rare applications that don’t utilize network communication in one way or another. Though these limitations will significantly limit widespread adoption, I believe it would be a mistake for a developer to shrug off Seatbelt as a whole.

Luckily, Seatbelt has an alternate application, though currently it is not officially supported. As I mentioned earlier, it is possible to apply sandbox restrictions to any pre-complied executable at runtime. This is done via the sandbox-exec binary, and uses predefined profiles housed at /usr/share/sandbox which provide for fine-grained control of resources. These profiles use a combination of allow/deny rules in combination with regular expressions to specify system resource access. There are numerous control points, such as network sockets, signals, sysctl variables, forking abilities, and process execution, most of which can be tuned with fairly decent precision by utilizing a combination of regex and static inclusion sets. Filesystem objects and processes are identified via POSIX paths; there currently is no target validation performed ether via checksums or digital signing.  

Figure 2 shows a sample sandbox profile that can be applied to restrict an application from making outbound communications and restricts file system writes to temporary directories and the user’s preferences folder. The ‘debug deny’ line tells seatbelt to log all policy violations. This proves to be very useful in determining filesystem and network activity by an untrusted program. It facilitates a quick-and-easy way to do basic forensic testing on any program acquired from an untrusted source. Figure 3 shows example log violations of a network-outbound violation, and of a file-write violation, respectively.

To apply a sandbox profile to a standard application bundle you must pass sandbox-exec the path of the mach-o binary file which is typically located in ‘Contents/MacOS/’, relative to the application’s bundle. You can specify a sandbox profile by name using the -n flag if the profile resides in /usr/share/sandbox, or you can specify a full path to a profile with the -f argument. Carbon applications may require the LaunchCFMApp wrapper to properly execute. See figure 4 for example syntax for both Cocoa and Carbon Applications.

Figure 2. Example sandbox profile

(version 1)
(debug deny)
(allow default)
(allow process*)
(deny network-outbound)

(allow file-read-data file-read-metadata
  (regex "^/.*"))
(deny file-write*
        (regex "^/.*"))
(allow file-write*
        (regex "^/Users/johndoe/Library/Preferences.*"))
(allow file-write* file-read-data file-read-metadata
  (regex "^(/private)?/tmp/"))

(import "bsd.sb")

Figure 3. Example log entries from TCP and filesystem write violations

3/4/08 12:15:10 AM kernel dig 79302 NET_OUTBOUND DENY l= unavailable r= 4.2.2.2/domain UDP 1 (seatbelt) 
3/4/08 12:43:05 AM kernel sh 79147 FS_WRITE_DATA SBF /Users/Shared/test.txt 13 (seatbelt) 

Figure 4. Using launchd to sandbox cocoa and carbon applications.  

Cocoa

% sandbox-exec -n localonly /Applications/TextEdit.app/Contents/MacOS/TextEdit

Carbon

% sandbox-exec -n localonly /System/Library/Frameworks/Carbon.framework/Versions/A/Support/LaunchCFMApp /Applications/Microsoft\ Office\ 2004/Microsoft\ Word

Unfortunately, the system seems to be far from finalized, and even some example profiles provided by Apple do not seem to be completely functional, or contain unimplemented control points. One example of this is seen when trying to implement IP-based network restrictions. Apple provides example entries for layer3 filtering in the included profiles, but they are commented-out and illicit a syntax error when ran. Additionally, Apple has a rather ominous warning in each of it’s provided profiles, stating that current profiles are deemed to be Apple System Private Interfaces, and may change at any time.

However, that’s no reason to completely ignore the technology. Given what has currently been implemented, and taking into consideration control points which are alluded to by Apple’s own imbedded comments, Seatbelt is showing significant promise to provide very fine-grained resource access capabilities. By utilizing these restrictions, applications and users can ensure that even in a worst-case scenario, possibilities for errant/hijacked process damage becomes mitigated and compartmentalized. There are many real-world situations where this type of access control model fits very well, particularly in complement to standard DAC systems: they can be used to mitigate privilege escalation opportunities for shell users, to confine behavior conformance of processes to defined resources (and there by protect against hacked processes), or as a forensic tool to determine software malfeasance. By providing these type of capabilities through the Seatbelt policy module, and by providing a path towards implementing more complex MAC policy modules, Leopard’s new MAC framework ushers in a new level of security and access control capabilities for OS X.

Leopard: Automatically Expand Open and Save Dialogs

Tuesday, February 26th, 2008

The open and save dialogs can automatically have the expanded view opened by default rather than having you need to open it manually each time you go to open or save a file. To enable this setting, use the following command:
defaults write -g NSNavPanelExpandedStateForSaveMode -bool TRUE

Solid-State Drives up to 128GB

Monday, January 14th, 2008

The new MacBook Air was introduced at MacWorld with the option for a 64GB Solid-State hard drive. Toshiba is also now offering Solid-State drives in sizes that are 32GB, 64GB and 128GB. The drives still seem to be lagging in adoption due to high costs, but they offer more durability, faster boot times and lower power requirements which should all lead to higher adoption over the next two years.

Toshiba will also begin making Solid-state SATA drives in May that can be used in desktop systems.
images-2.jpeg

Leopard: Flush the Cache Resolver

Tuesday, November 20th, 2007

So you need to empty your cache resolver, but you fire up your handy lookupd but you’re getting a command not found error. What to do… Try dscacheutil, which let’s you do so very much more than lookupd. For example, using the -cachedump allows you to dump an overview of the cache contents. -cachedump has a slew of flags to get pretty granular with the output such as -entries and -buckets. -configuration allows you to access detailed information about your search policy. -statistics allows you to view detailed information on statistics of calls.

Examples of using these commands:
Emtpy the DNS Cache Resolver:
dscacheutil -flushcache

Dump cache with user entries:
dscacheutil -cachedump -entries user

Lookup all the users on a system:
dscacheutil -q user

Leopard Server: Use Unsupported Disks with Time Machine

Tuesday, November 20th, 2007

If you want to use an unsupported disk type for your Time Machine archives, running the following command on workstations will allow you to do so:
defaults write com.apple.systempreferences TMShowUnsupportedNetworkVolumes 1

Leopard Server: Reskin WebMail

Tuesday, November 20th, 2007

The default “skin” of the WebMail server (SquirrelMail) in OS X server leaves a lot to be desired to some. So we thought that we would post some of the more popular skins/themes (or collections of themes) that we’ve been using so you can check them out:

http://www.squirrelmail.org/themes.php

http://www.nutsmail.com

http://www.roundcube.net

http://sourceforge.net/projects/squirreloutlook

Happy skinning!

Leopard Server: Customizing iChat Server Welcome Messages

Tuesday, November 20th, 2007

Customizing the welcome message to new users of your iChat server is a fairly simple task. For this, we’ll look into the jabber configuration because jabber is the Open Source package that iChat Server is built on.

When you first setup jabber the /etc/jabber directory will be created. Inside this folder will be a file called jabber.xml. If you open the jabber xml file and look for the “welcome” tag then anything between the "welcome" and "/welcome" will be the information that is shown in a welcome screen when a new user signs onto the iChat server. Before you edit the /etc/jaber/jabber.xml file make sure to back it up.

For this example we will have all new users receive a message that says Welcome to the 318 iChat Server. To do this, delete or comment out the information between the existing welcome tags and add the following information:

"welcome"
"subject"318 iChat Server"/subject"
"body"Welcome to the 318 iChat Server"/body"
"/welcome"

Save the jabber.xml file and you’ve now customized the welcome message for your iChat server.

Note, for the purpose of this article the < and > have been replaced with quotes (“). However, you will need to use the < and > in your environment while using the Jabber.xml file.

Leopard Server: Sharing Folders using Server Admin

Friday, November 2nd, 2007

We’ve gotten a few questions from people asking how you’re supposed to setup share points for Leopard Server. It’s relatively simple but will require a little getting used to for those who are used to configuring sharing options in Workgroup Manager.

To view the shared folders on a system, open Server Admin and click on the name of the server in the SERVERS list. From here, click on the File Sharing button in the Server Admin toolbar and you will see a list of the logical volumes that your server can see along with a handy Disk Space image showing how full the various volumes are. At this point you can click on Share Points to see which folders are currently being shared over SMB, AFP, NFS or FTP. If you click on Volumes and then the Browse button then you will be able to configure new folders to become share points that you want others to get access to. Browse to the folder to be shared and then click on the share button in the upper Right hand corner below the tool bar.

Now you are looking at 3 tabs along the bottom of the screen: Share Point, Permissions and Quotas. From here, click on Share Point and review the options:
Enable AutoMount – provides options to setup an OD link to the volume
Enable Spotlight Searching – allow the volume to be searchable using Spotlight
Enable as TimeMachine Backup Destination – client computers can backup using Time Machine
Protocol Options – brings up the screen that allows SMB, AFP, NFS and FTP settings to be configured (looks very similar to the old screen in Workgroup Manager)

Once you have configured the options for your share point click over to the Permissions tab. Now you can configure who has access to shared data. From here, the main change is that the Users and Groups window is a floating window, with a new look and feel, but with the same overall feature set. The next major change is that ACLs are listed above POSIX permissions, and when you drag a user or group into the window you will see a blue line indicating that you can drop the object off into the screen and it will stay.

Finally, click on the Quotas tab and notice that when you enable quotas you cannot drag users and groups into this window. Only users with a home folder on the volume can be configured for quotas using Server Admin. If you would like to configure quotas otherwise you can do so at the command line.

ZFS: What was all that fuss about?

Friday, November 2nd, 2007

ZFS was released by a team at Sun in November of 2004. The name stands for “Zettabyte File System”. ZFS is a 128-bit file system, so it can store 18 billion billion (18.4 × 1018) times more data than current 64-bit systems. We’re not going to sit here and do the math for that but you are more than welcome to figure out what the theoretical size is at that point – all we can say is that it’s friggin’ huge.

Traditional file systems reside on single devices and require a volume manager to use more than one device to generate a logical or physical volume. ZFS is built on top of virtual storage pools called zpools. A zpool is constructed of virtual devices called vdevs. Vdevs are constructed of block devices that include files, partitions, or drives. Block devices within a vdev can be configured in a variety of different manners, depending on the needs of a user. The storage capacity of all vdevs is available to all of the file system instances in the zpool. This is similar in some ways to how Xsan builds volumes, but more customizable and without a requirement for vdevs to be based on Fibre Channel storage in order to be accessible by multiple hosts.

Quotas can be set to limit the amount of space a file system instance can occupy and a reservation can be set to guarantee that space will be available to a file system instance. This gives some nice features to those wanting to limit access for some volumes while still making sure other volumes have the space that will be required for planned future possible expansions. Other features of ZFS include: snapshots, write-cache, filesystem based encryption (in Alpha stage of development) and checksumming.

While users of Leopard may be disappointed in the fact that ZFS did not make it in the final build, giving greater volume sizes and more features for volume management, rest assured that Apple will be thoroughly testing any new file systems before making them available to the public and that with something as precious as a file system, if it wasn’t ready for prime time then it’s good that it wasn’t included with Leopard. ZFS is still going through changes and is not a completed or matured project by any stretch of the imagination. In /Library/FileSystems you will see that ZFS is not present but the framework for future ZFS is present which can be seen by the introduction of some ZFS binaries to the system. So keep a look out for ZFS in the future and maybe even an SDK from SUN on using it at some point.

Leopard Server: Using RADIUS with the Apple AirPort

Thursday, November 1st, 2007

Remote Authentication Dial In User Service (RADIUS) can help to take the security of your wireless network to the next level beyond standard WPA authentication. Prior to Leopard RADIUS communications could be obtained using Elektron or OpenRADIUS running on OS X – but in Leopard no 3rd party software is required beyond Leopard Server. So how difficult is it to setup RADIUS on Leopard? You be the judge after reading this quick walkthrough. For the purpose of this walkthrough we are going to assume that you are using the Advanced Mac OS X Server style.

Before you begin this walkthrough, make sure that the server is running Open Directory and that the forward and reverse DNS information for the server is correct.

The first step to using RADIUS is to enable it. To do this, open Server Admin, click on the name of the server in the SERVERS list and click on the Services tab. Find RADIUS in the services list and place a checkmark in the box to the left of it. When you click on Save then you should see RADIUS in the SERVERS list.

Now that RADIUS has been enabled, let’s select a certificate. For the use of this walkthrough we’re going to use the default certificate that comes with OS X Server. Click on RADIUS under the SERVERS list and then click on the Settings button. Click on the RADIUS Certificate drop-down menu and select the Default certificate. Click on the Edit Allowed Users… button.

By default all users of the OS X Server will have access to authenticate to the wireless network setup, so here we are going to click on the For Selected Services below Radio Button. Then click on RADIUS in the Service list. Now click on Allow Only Users and Groups Below and then click on the + sign. Now drag the users and groups into the Name list from the Users and Groups window. Once all users that should have access to your new wireless environment have been enabled, click on the Save button.

From here, click on RADIUS and click on the Start RADIUS button in the bottom left hand corner of the screen. RADIUS is now ready to accept authentication. The next step is to configure an AirPort to work with RADIUS. To do this, click on the Base Stations button in the toolbar at the top of the screen. Now click on Browse and select the first base station of your new wireless environment from the list of found base stations. Enter the password for the AirPort and click on Save. Wait for the AirPort to complete its restart and then you should be able to log in from a client.

To log in from a client, select the name of the wireless network from the wireless networks list and enter the username and password to the environment. The first time you do so you will get a second dialog asking you to enter the 802.1x username and password. Enter the same username and password and click on OK. If you click on the “Use this Password Once” checkbox then this password will not be saved for future use.

That’s it, you’re done. Now this setup may be a little more complicated than WPA personal or WEP 128, but it’s far more secure and should be considered for any AirPort environment that has an OS X Server. While the default certificate will work for clients, things are often easier from a deployment and interoperability perspective if you purchase a certificate from a CA such as Thawte. Also, this has all been tested in a pure Mac OS X Leopard environment, not with an OD structure based on Tiger. More on that as time goes on…

Leopard Server: Mailbfr, spamtrainer and amavis-stats

Thursday, November 1st, 2007

Mailbfr, spamtrainer and amavis-stats are great packages that fit into Mac OS X Server. The guys from topicdesk have been kind enough to post an overview on how their products work under Leopard and how the changes in Leopard impact their utilization. Check it out at:

http://osx.topicdesk.com/content/view/129/1/

New Mac Trojan Discovered

Thursday, November 1st, 2007

Monday, October 29th, 2007 – Intego issued a security alert about a new Trojan Horse called OSX.RSPlug.A targeting the Mac. OSX.RSPlug.A changes the DNS (Domain Name Server) address that infected systems use to access web sites and installs a new task on infected systems to change the DNS server again if the end user changes it back to what it was before. This is similar to many attacks against the Windows Hosts files. However, if anyone is going to get this worm they have to authenticate as an administrative user for their system to get infected.

OSX.RSPlug.A has been found on some pornographic Web sites and when an user is trying to view a movie, they are told that “Quicktime Player is unable to play movie file. Please click here to download new version of codec.” If the user clicks the link a disk image (.dmg) is downloaded to the desktop. When the software is used, the user is actually installing the Trojan as root, giving it access to the full computer. When the malicious DNS server is active, it hijacks some web requests, leading users to phishing web sites or to web pages displaying ads for other pornographic web sites, according to Intego.

For more information, see the original security alert from Intego at:

http://www.intego.com/news/ism0705.asp

Leopard Server: Introduction to Wikis

Sunday, October 28th, 2007

Leopard Server and wiki. It’s cool and it works. But when you’re first looking into it, it might seem a little confusing. So let’s do a simple walkthrough. Here we’re going to enable a wiki in advanced mode for a group called testgroup and we’re going to give a user called testadmin access to edit the wikis and create new ones. To get access to the wiki we’re going to assume a hostname of server.318.com.

First, let’s go into Workgroup Manager and create a new group called testgroup. To do this, open Workgroup Manager, authenticate to Open Directory and click on the New Group icon in the toolbar. Enter a name for the group (testgroup for this example) and check the box for “wiki and blog.” Select the website to publish the wiki to in the Enable the following services for this group on field. Choose who can view and who can write to the wiki and click on the Save button.

Now let’s create a user called testuser. In Workgroup Manager, click on the User list and click on New User. Now enter a name for the user and a password. Then use the Groups tab to put the user into the testgroup group. Now click on Save.

Now that we have a user and group to give access to the wiki let’s go ahead and create a wiki. To do this open Server Admin. If the Web Service has not been enabled yet, click on the server name, click on Settings in the toolbar and then click on the Services tab and place a check in the box for Web. Now click on the web icon and click on the Settings tab. Select a theme for your site and click on Save. Now click on the Sites icon in the toolbar and click on the site you’d like to publish your wiki on. From here click on the Web Services tab and put a checkmark in the Wiki and blog box. Now click on Save. Then Start the web service.

Now you should be able to open up a web browser and go to URL of the server. Remember, do this by host name and not IP. At this point, you’ll see the Groups tab along the top navbar. From here you can click on Groups and then click on the group you want to create the wiki for (testgroup for our test wiki). Now you’ll be asked for a username and password. Enter the testuser you created and the password that you gave to testuser. Now you can click on the + icon to create your first entry into the wiki. Let’s call it testpost.

That’s it. You’ve now created your first wiki article on your new wiki server. Notice that if you enabled calendars and blogs that there will be icons for these in the top nav bar. You can customize everything you see on the screen to give it a more organizational look and feel. For example if you click on the pencil icon you will be able to rename the blog and customize the prebuilt information listed in the Welcome to your Wiki page.

Leopard Server: Introduction to Ruby on Rails

Sunday, October 28th, 2007

So Ruby on Rails… What does this mean for me and what exactly is Ruby on Rails from a systems administration standpoint? Ruby on Rails was created by David Heinemeier Hansson from his work on Basecamp, a web-based project-management tool, by the company 37signals. Ruby on Rails was first released to the public in July 2004. Ruby on Rails is a web application framework designed to support the development of dynamic websites. To see some sites built using Ruby on Rails check out http://happycodr.com

Ruby is an object-oriented program language that Rails is built on.  To access rails, you can use the rails command.

The Ruby on Rails framework is built into Leopard Server and can be started up using the mongrel_rails start command. It can be stopped using the mongrel_rails command. Mongrel is a fast HTTP library and server for Ruby. Mongrel_rails is a command line tool that can be used to control the Mongrel webserver.

Some options to the mongrel_rails command include the following:
-d daemonize
-p assign a custom port
-a assign an address for the HTTP listener
-l assign a log file to use
-t customize the timeout variable
-m use additional MIME types
-r change the document root
-B enable debugging
-C use a configuration file
-S define an additional config script
-h access the help libraries
-G generate a config file
–user define who the server will run as
–version get the version information for Mongrel

But that’s not all you can do with mongrel_rails. The actual file is not compiled so you can read it in clear text and learn more about what it is doing behind the scenes. Just cd into the /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/ folder to find it. One item of note is the inclusion of mongrel_rails_persist, a wrapper for mongrel_rails that allows admins to register the Mongrel Server with Bonjour and create a launchd plist to run Mongrel (/Library/LaunchAgents/com.apple.persist.portnnnn.mongrel_rails_server.plist).

So let’s say that you have a Ruby application that lives at the following location /Library/WebServer/MyRubyApp. You can run the following command to launch it over port 8001 in a persistent manner:
mongrel_rails_persist start -p 8001 -c /Library/WebServer/MyRubyApp

To access it from a web browser you would enter the address http://servername.domainname.com:8001

From here you’ll be able to daemonize Mongrel and provide the Rails development framework to developers in your environment. There are already a lot of projects for using Ruby with FileMaker and other database systems, so keep an eye out for more information about this piece of Leopard Server!

Leopard: The New Terminal.app

Saturday, October 27th, 2007

Apple has been slowly winning over a lot of traditional Unix and Linux converts. This new breed of switcher is after a cool shell environment. In Leopard, Apple has upgraded Terminal.app to provide a whole slew of new features that are sure to continue winning new converts. Let’s just take a look at a few of them:
Secure Keyboard Entry – Prevent other applications from detecting keystrokes used in terminal. Enable this using the Terminal menu.
Tabbed Interface – I always have 3 shell windows open. That’s how I roll. But with the new tabbed interface (which you can access using the Command-T keystroke) I find that I’m using two shell windows with 3 tabs each. This gives me the ability to have a man page or process list on one side of my screen while being able to run other commands on the other side. You can fire up 2 shell windows and then open as many tabs as you like.
Export Settings – This isn’t new in Leopard, but what is new in Leopard is that the tabs get exported along with window positions, layouts, themes and backgrounds.
Themes – Glass, Homebrew, Novel, Red Sands – these themes allow you to use prebuilt templates for how you view your shell. These include background, text color, transparency. Can you imagine Steve sitting in his office at Apple dinking around with the Homebrew theme?
Window Groups – A group of windows with a saved location, tabbed layout, shell configuration and settings.
Terminal Inspector – Switch themes on the fly, view running process and increase the columns and rows of a shell environment.
Titles – Set titles for your terminal windows so you can remember what was where.

Leopard Server: Using Directory to Update LDAP Entries

Saturday, October 27th, 2007

If you’re migrating to Leopard and Leopard Server then you’ve likely noticed the welcome addition of a new program in /Applications/Utilities called Directory. Directory allows users bound into an Open Directory environment to update LDAP records provided they have access to do so. Using LDAP ACLs it’s possible to give users access to update their own directory information using an LDAP directory browser such as Directory.

When you open Directory you should see a listing of all of the directory information that has been created. From here you can create Shared Contacts, Groups, Locations and Resources. Each of these can be connected to a calendar. Groups can have multiple members and get a Mailing List, Calendar or Blog connected to them.

Resource types include Automobiles, Conference Phones, Copiers, Digital Cameras, Notebooks, Printers, Projection Screens, Projectors, Scanners and Video Cameras. Resources can be reserved in an iCal Server Calendar and can have a delegate. Delegates are users that are able to manage particular resources.

The fact that there are a lot of objects in the LDAP database that can be managed means that it’s important to have a tool for configuring who can manage them. Workgroup Manager has basic permissioning built it but it isn’t as granular as a lot of organizations will need. To get more granular it might be required to dip into the command line and configure LDAP using the configuration files. To get started with this, see the article from a couple of days ago about LDAP ACLs.

Leopard Server: Troubleshooting iCal Server

Saturday, October 27th, 2007

So you installed your new server and you’re having a few problems. Let’s look at the common issues and a few simple fixes for them.

iCal will not start, with log entries that it is unable to create a virtual host:
Check your host name. iCal is going to need the host name to be correct in order to start. Use scutil --get HostName and then make sure that the host name listed in the iCal Server settings is identical to this value.

You setup a user, check the box in Workgroup Manager for Enable Calendaring and then save your settings but you get the following error in your logs:
Oct 12 15:51:26 cedge Workgroup Manager[2282]: +[WPUser userWithGUID::] returned nil!

This is likely caused by the fact that you are enabling a calendar for a local user. Try using an OD based user and see if you get the same error.

You got everything started and the account was created for the user but when you add an account in iCal it fails to connect. Make sure that the port that iCal server is using is located at the tail end of the host name for the iCal Server. One issue that we see here is that unless you are using managed accounts then iCal Server is not likely going to append the port number for you iCal Server. Also verify that you can connect to the remote server, and remember that you can always open the URL of the server followed by a : and then the port number and get a login prompt. If you can authenticate to this as the user whose calendar that you are trying to setup then you can use the information in this screen to determine ACL information and other security settings that could be keeping calendars from working. Also keep in mind that while your default port might be 8008 your default port if you are using SSL is actually 8443.

Once you get this far, you should be able to create an event and see data listed in the Overview tab for iCal. If so then you should be able to about anything you want in the iCal server.

If you prefer to use the serveradmin CLI to control your services, you can also use the serveradmin settings calendar:ServerHostName = "SomeHostName" variable to change your host name. You can also use the calendar:HTTPPort to change the port number you are using for connectivity.

Happy Calendaring!!!

Leopard: New Certification Track

Saturday, October 27th, 2007

The Tiger Apple Certified Systems Administrator (ACSA) track allowed certification candidates to accomplish the ACSA by getting an Apple Certified Technical Coordinator (ACTC) and then obtaining 7 points. Points were obtained by taking a variety of exams whose point values were based on the number of days of the corresponding class.

Apple has now posted the ACSA requirements for 10.5. There is no longer a point system, which was a unique approach in the IT industry for achieving certifications. Instead, for the Leopard ACSA, Apple has now trimmed down the number of courses that are provided and require that all exams be completed to accomplish the ACSA. For now, the certificates listed include:
Mac OS X Server Essentials v10.5
Directory Services v10.5
Deployment v10.5
Advanced Administration v10.5

Notice that there are no workstation oriented exams listed. The Support Essentials exam is all that is required to achieve an Apple Certified Help Desk Specialist (ACHDS) for Tiger. The ACHDS certification has been retired and replaced with the Apple Certified Support Professional for Leopard, which replaces the ACHDS and only requires the Support Essentials exam.

More information on the new certification program can be found here:

http://training.apple.com/certification/macosx

Leopard Server: Documentation Released

Saturday, October 27th, 2007

To answer all those questions like “How do I create a share point now?” Apple has been kind enough to post the documentation for Leopard Server at:

http://www.apple.com/server/macosx/resources/

All of the new services are documented per Apple standards, so happy reading!

Leopard Server: Advanced Setup with Server Admin

Friday, October 26th, 2007

So you selected Advanced Setup during the wizard while you were installing Mac OS X Server and now you’re looking at this new Server Admin screen that you’ve never seen before. You see the server name but there are no services in the list. This is because Apple has gone the extra step to make Server Admin less confusing and more user friendly than ever before. When you click on the Settings icon at the top of the Server Admin screen you will see the tab for Services. Here, you can enable or disable any service by checking its box and clicking on the Save button.

Once a service has been enabled then it will appear under the server in the Servers list (notice it no longer says Sites and Services). From here, you’ll notice that the old chicklets from the bottom screen are gone. Now they have been replaced with an icon set in the toolbar that changes as you click between the services. For example, the AFP Service shows Overview, Logs, Graphs, Connections and Settings. Clicking through these icons, you’ll notice that they provide the same experience that the chicklets at the bottom of the screen provided. However, by placing them at the top the user interface makes more sense. One thing that is a bit strange is the decision to move the Start and Stop buttons to the bottom of the screen. When you enable a service it will not start by default so if you want to begin using it look to the bottom of the list and click on the Start button for the service.

When you enable and then click on each service you will notice that many have the same options that they’ve had in the past. There are exceptions (like a more granular logging tab for the FTP service), as there are with every version. But for the most part many of the settings have stayed the same through a few versions of the OS because they just make sense in how they are laid out.

New Services added are Radius, Podcast Producer, MySQL (which actually existed in its own stand-alone application before) and iCal. Each of these has a great purpose and will hopefully be explored in detail as time goes on. You might notice that one service, Applications, is gone from the list. Tomcat has now been moved into the Web Service as a checkbox (Enable Tomcat).

So that’s the quick and dirty tour of the new Server Admin application. It’s sleeker and has a (in our opinion) much improved interface over the old Server Admin.

Leopard: Advanced Network Interface Management (GUI)

Friday, October 26th, 2007

Slight change from how things were done in Tiger/Tiger Server, but all the old options are there if you look. The first change is that now there is a wizard that you can use to configure your network interface. Since this is on more advanced topics we’ll skip that but it’s worth noting.

Another shift is that a network interface is now referred to as a Service. So when you go to add a interface you will associate it with a Service Name. If you remove a Service using the – icon in the list you can always readd it by clicking on the + in the services list, selecting the interface and assigning it a Service Name. If you check ifconfig you will find that if you remove a service and readd it then it will come back up with the BSD name that it originally had. For example, remove the Firewire Service, Apply your changes, readd the Firewire Service and in ifconfig it will still show as fw0 in the list. If you add a second service for fw0 and assign it unique IP stack information then it too will show as a second IP address under the same BSD interface as can be seen below:
inet 192.168.210.110 netmask 0xffffff00 broadcast 192.168.210.255
inet 10.0.0.9 netmask 0xffff0000 broadcast 10.0.255.255

In order to setup a second IP address for one NIC using the GUI for Leopard:
Open System Preferences and go to the Network Preference Pane.
Click on the interface you would like to run a second IP address on.
Click on the cog wheel at the bottom of the list.
Click on Duplicate Service.
Type the name for your new Interface and click OK.
Click on the New Interface and click the Advanced button.
Click on TCP/IP and enter the appropriate IP information.
If needed, enter information for DNS, WINS and Proxies under their respective tabs.
Click on OK.
Click on Apply.

Now, rather than use one NIC you might want to use two NICs as one, or use Link Aggregation. Assuming the switch supports it and you have that side of things configured, here’s where you configure Link Aggregation:
Open System Preferences and go to the Network Preference Pane.
Click on the cog wheel at the bottom of the list.
Click on Manage Virtual Interfaces…
Click on the + icon.
Click on New Link Aggregate.
Enter the name for the new Link Aggregate “bond”.
Check the boxes for the interfaces that support Link Aggregation in the list.
Open Terminal and run ifconfig.
Find bond in the list and verify that the correct MAC addresses for your aggregated NICs are in the list of MAC addresses for bond0 (or whatever BSD name was given to your bond when it was created).

To reorder services, click on a service and use the cog wheel to select the Set Service Order… option. From here you will be able to drag services up or down the list. The first service in the Service Order is still the default service that traffic will reply to. Therefore, if you want to actually use the additional services to respond to traffic you will still need to use the route command as has been used in *nix for a long time.

Kerberos Pruning Script

Friday, October 26th, 2007

I have noticed that over time inconsistancies can arise where a machine entry will be deleted from LDAP but the relevant kerberos principals remain in the KDC. Here’s a small script that I wrote up to help prune out unwanted/stale kerberos principals. Obviously great care must be taken when running this script; if you delete a principal that is still in use, things ARE going to break. So, think before you type. That being said, if you’re not interested in typing 20 delprinc commands, this script is for you.

Usage: %pruneKerb.sh query

pruneKerb will then list all principals matching “query” (standard case-sensitive grep match)

It takes a single argument query and outputs a list of matching
kerberos principals, presenting the user with the option to delete individual principals, all principles or simply print a list of matching principals.

Please read the scripts’ comments for more information.

pruneKerb.sh

Leopard: Disable the Glass Shelf Look in the Dock

Friday, October 26th, 2007

For early Leopard adopters that don’t like the new look and feel of the dock, here’s a command to disable that Glass shelf look in your dock:


defaults write com.apple.dock no-glass -boolean YES killall Dock

If you would like to revert the setting:

defaults write com.apple.dock no-glass -boolean NO killall Dock

click on the code and choose run to activate or deactivate this setting

Leopard Server: Using ACLs with Open Directory

Friday, October 26th, 2007

In Leopard, Workgroup Manager supports rudimentary ACLs for the LDAP database. We’re all familiar with Access Control Lists by now. Especially in the Mac OS X Server community. However, we might not all be familiar with ACLs as they’re implemented in LDAP. But we should be, because LDAP is being used more and more as an address book, and with the new Directory application being shipped in Leopard it is conceivable that environments aren’t just going to use ACLs to secure LDAP but they’re also going to use them to allow users to self update their information in the directory. So in the interest of security and making the most out of the technologies build into LDAP, let’s cover LDAP ACLs for a bit. So to push beyond what you can do in Workgroup Manager, let’s take a look at building out more finely grained ACLs manually.

First, like with most things in LDAP ACLs are configured using the /etc/openldap/slapd.conf file. Below is the pertinent portion of this file that we will be looking at:

# Define global ACLs to disable default read access.
# Do not enable referrals until AFTER you have a working directory
# service AND an understanding of referrals.
#referral ldap://root.openldap.org
# Sample access control policy:
# Root DSE: allow anyone to read it
# Subschema (sub)entry DSE: allow anyone to read it
# Other DSEs:
# Allow self write access
# Allow authenticated users read access
# Allow anonymous users to authenticate
# Directives needed to implement policy:
# access to dn.base="" by * read
# access to dn.base="cn=Subschema" by * read
# access to *
# by self write
# by users read
# by anonymous auth
#
# if no access controls are present, the default policy
# allows anyone and everyone to read anything but restricts
# updates to rootdn. (e.g., "access to * by * read")
#
# rootdn can always read and write EVERYTHING!

Now, if we remove the commented out portions of the file or add more lines we can start to limit who has access to read and/or change what information in the LDAP database. Keep in mind that you always want to back up your slapd.conf file prior to doing so.

You can control access to each element in the database. Each ACL has an “access to” which is the elements in the LDAP database that you are granting or denying access for and then a “by” portion that lists who can do what to that portion of the database. An entire ACL can be listed on one line, as is done with policies that have only one user or group associated to them. For example, the following line gives anyone and everyone read access to the database:
access to dn.base=”" by * read

For ease of use and reviewing, we typically put the “access to” on one line and the subsequent users or groups with access in their own “by” lines for more complicated ACL rule sets. Slapd parses the file in such a way that it realizes that “access to” means the beginning of a new ACL. The following is an example of some more complicated ACLs:

access to attrs=userPassword
by dn="cn=users,dc=318,dc=com" write
by self write
by * compare

access to *
by dn="cn=computers,dc=318,dc=com" write
by users read
by * auth

Access levels in ACLs are hierarchical. Levels that are used are none, auth, compare, search, read and write. None is the lowest level of access and write is the highest. Each level includes the rights of all lower levels. In the above example, a user is able to write to their own userPassword record. This means that the user is also able to auth, compare, search and read that record.

ACLs are prosessed from top to bottom. This makes it important to put specific ACLs and by statements above more general ones. ACLs that restrict access to the userPassword attribute, followed by one applicable to *, that is, the entire LDAP database. In the above example, placing the userPassword ACL first causes the rule that allows users to change their own passwords to process before the wildcard that specifies everyone. When a * is used as a wildcard in the access to line of slapd.conf it means the entire database or tree of the LDAP database. When the * is used in the by line it typically denotes all users.

Access levels in ACLs are hierarchical. Levels that are used are none, auth, compare, search, read and write. None is the lowest level of access and write is the highest. Each level includes the rights of all lower levels. These two points, the first match wins rule and the inclusive nature of access levels, are crucial to understanding how ACLs are parsed. They also are important for making sure your ACLs don’t lead to either greater or lesser levels of access than you intend in a given situation.

It can be time consuming to go through every possible attribute by group and determine who has access to what. However, if you want to have users updating their own addresses, phone numbers, and other information, as can be done with the Directory application, this is often one way to accomplish this goal. You could also provide help desk users the ability to update the database using the Directory application but not allow them to access other records in the LDAP database, such as group memberships. Having a very granular ACL environment for records can also allow you to obtain a maximum level of security.

This can also be put into the schema in order to force replication between hosts. Keep an eye out for that article at a later date. ;)

For what it’s worth, at 318 we’ve found that commenting out each ACL helps us to keep track of who did what, why and what they were thinking when they did it. Happy OD everyone!!!

Leopard: Custom Installations

Thursday, October 25th, 2007

Installing Mac OS X is a fairly simple task to complete and can typically take up to an hour or more depending on the installation options you choose. However, you should review all of your options in the installer as many items are not needed unless you have a specific need for them. Installing any operating system involves choices, which we will reveal throughout this chapter. If you are reinstalling your operating system, just make sure to have a valid backup before you continue on with this chapter.

The Installation Process
Installing Mac OS X requires little of a user other than agreeging to the license agreement, known as an EEULA and being able to click on continue. Many of the choices available during installation can be left at their default settings. The system will simply guide you in many cases allowing you to click Continue or Agree at most of the dialog boxes and obtain a default installing.
But the power user knows better and wants to be up and running as quickly as possible. The power user wants to leave out any of the items from the operating system that they’re not going to use and the power user is going to want a level of control over what is on their system that can’t be had by doing a default installation.

Also, until the system starts the Checking Disk process, which it will do in order to verify your installation media, you can stop the installation and go back to the operating system you had before. Of course, if you reformat a drive going back to your operating system will no longer be an option.
Note: You can access Disk Utility while booted to the CD in order to partition your hard drive, but if you plan on using Boot Camp to install Windows onto a partition then you will need to leave your system with one partition.

The installation process takes users through a variety of steps to help choose which parts of the operating system to install. At most of the stages, you will be able to click on the default value and proceed without actually customizing anything. However, you will see a Customize button at many of the screens that can be used to

Note: Each version of OS X will have a slightly different installation process. This article is written for OS X 10.5. However, if you are using a previous version then while some of the screens will be similar do not expect them all to be the same.

Installing an Operating System onto an External Drive
When you install OS X you can choose to install it on any drive that is visible to your computer. This can be a USB jump drive, a FireWire hard drive or an Xserve RAID. There are a variety of reasons why you would use any of these as a boot medium rather than your internal drive. Whether the reason is portability, drive size, redundancy or performance, Apple has given us a lot of options by allowing the installation of the operating system on any medium the computer can access that doesn’t require special drivers.
• USB jump drive: Placing a customized and very trimmed down operating system onto a USB jump drive can provide you with the ability to have a quick and easy way to troubleshoot any computer in your pocket at any time. The size of a USB jump drive makes it a good choice for people just looking to
• FireWire: Firewire hard drives are becoming more and more inexpensive with each passing year. These portable drives can allow you to take your files with you anywhere. But they’re not as good for using as a full time operating system. They are great for carting around installers, using as targets for your backups and it never hurts to an operating system on to use for troubleshooting.
• Internal RAID 0: A RAID is a random array of independent disks, or disks that have been combined for a specified outcome. RAID 0 disks are particularly helpful with increasing performance and obtaining a larger drive than what is possible without using a RAID. Computers with an operating system installed on a RAID 0 will receive a slight speed increase, but if either drive fails then you risk loosing all of the data on the volume.
• Internal RAID 1: A RAID 1 disk set is also known as a mirror. In a mirrored disk set, if any single drive fails then all of the data is also located on the second drive. There is a slight reduction in speed for RAID 1 volumes.
• Internal RAID 5: Apple recently released a card that allows for using 3 internal drives to create a RAID 5 volume. RAID 5 allows for redundancy as is found with RAID 1 and a larger volume as is found in RAID 0 with an offset in the speed decrease.
• Xserve RAID: The Xserve RAID can be connected to a computer through a fibre cable and allows for a single volume size of up to 10 terabytes.

Once you have your drives ready to install onto you will want to choose whether to do an upgrade or a new installation. If you are coming from a previous version of Mac OS X or having problems with your existing installation then you will likely want to do an Archive and Install. If you are working on Mac OS X Server you will likely need to do a format prior to installation. Once you have chosen which of these you will be doing then click on the Next and get ready to customize your installation. At this point you will be able to click on the Custom… icon and choose which parts of the OS to install. Don’t worry, if you leave anything out that you later decide you would like you can always go to the installation CD and install it as a package manually.

Now, click Install and you’re off to the races.

Using the JAMF Binary with the Casper Suite

Thursday, October 25th, 2007

Casper is an incredibly useful tool for package deployment, maintaining records of the systems in your environment and policy management. But for those of you already using Casper (or considering it) you’ll be glad to know that you can use the jamf binary to do all kinds of fun stuff that can help with troubleshooting computers in your environment. For example:

The following command will setup a hidden SSH user and restrict SSH access to be allowed by only that user:
jamf createAccount -username casperadmin -realname "Casper Admin" -password capseradmin -home /Users/casperadmin -hiddenUser -admin -secureSSH

This command can be used to display a popup on the system it’s run on that says “Hello Minnesota”:
jamf displayMessage -message "Hello Minnesota"

The following command will unmount a mounted server called mainserver:
jamf unmountServer -mountPoint /Volumes/mainserver

The following command can be used to change a users home page in all of their web browsers:
jamf setHomePage -homepage www.318.com

The following command can be used to fire up the SSH daemon:
jamf startSSH

The following command can be used to fix the By Host files on the local machine:
jamf fixByHostFiles -target 127.0.0.1

The following command can be used to run a Fix Permissions on the local machine:
jamf fixPermissions /

The following can be used to flush all of the caches on your local system:
jamf flushCaches -flushSystem

The following can be used to bless the drive externaldrive:
jamf bless -target /Volumes/externaldrive

The following can be used to run a software update on the local system:
jamf runSoftwareUpdate

The following can be used to bind to an AD environment (rather than dsconfigad if for some reason you just didn’t like using dsconfigad), but would need all the parameters for your environment put in as flags:
jamf bindAD

The following can be used to enable OpenFirmware passwords on your computer to secretpass:
jamf setOFP -mode full -password secretpass

Most of these options are available inside the Casper suite, but the ability to do some simple tasks very quickly from the terminal is yet another reason to fall in love with Casper.

Leopard Server: CalDAV Event Formatting

Thursday, October 25th, 2007

A key aspect of any groupware solution is the ability to share calendars. Leopard server brings the long-awaited ability to share calendars to the Mac OS X Server platform. Leopard uses CalDAV as the back end protocol for Calendar sharing. CalDAV is currently supported by Facebook, Novell Evolution, Zimbra, Drupal, Microsoft Exchange, Kerio and now Mac OS X Server.

CalDAV looks at each event as an HTTP resource, giving users the ability to view events in a web browser. Each event is stored in the iCalendar format.

A typical event in the iCalendar format:
BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//Apple Calendar//Calendar1//Charles Edge
BEGIN:VTODO
DTSTAMP:19980130T134500Z
SEQUENCE:2
UID:uid4@host1.com
ORGANIZER:MAILTO:riaa@us.gov
ATTENDEE;PARTSTAT=ACCEPTED:MAILTO:riaa@host.com
DUE:19980415T235959
STATUS:NEEDS-ACTION
SUMMARY:Random Music File
BEGIN:VALARM
ACTION:AUDIO
TRIGGER:19980403T120000
ATTACH;FMTTYPE=audio/basic:http://myhost.com/publish/audio-
files/file.mp3
REPEAT:3
DURATION:PT1H
END:VALARM
END:VTODO
END:VCALENDAR

Parsing this data can help you to imbed data from Leopard Server into your 3rd party web services. One difference between CalDAV events in Mac OS X Server and other types of event handlers is how they are presented over the wire. For example, Kerio, a popular Mac-based groupware solution presents CalDAV in the form of an ICS file so it can be viewed through iCal in pre-Leopard computers.

Finder Shortcuts

Thursday, August 23rd, 2007

When you’re active application is the Finder then check out these shortcuts:
Command-N opens a new finder window
Command-Shift-N creates a new folder in the active folder of your finder
Command-W closes a window
Command-Shift-W closes all the windows (if you have more than one open)
Command-Shift-Escape
Command-E ejects a disk or mounted volume
Command-Tab switches to the previous application
Command-Shift-Tab switch to the next application
Command-Shift-Delete trashes an item
Command-Shift-Option-Delete empties the trash without a warning dialog

Tripwire Basic Installation

Monday, August 21st, 2006

To install Tripwire, run in the folder that you have extracted the tripwire files into
sudo ./install.sh
Then enter passphrases/passwords when asked
Then enter the shortname of the primary user of tripwire
Allow the system to define the baseline state of the Server.

To update your tripwire database after making system changes run this command:
./tripwire -m u -r ../report/day-month-year-initials.twr

To update your tripwire config, change the /usr/local/etc/twcfg.txt file and run this command
./twadmin -m F -S ../key/site.key ../../etc/twcfg.txt

To enforce a new policy, edit the /usr/local/tripwire/policy/twpol.txt file and run this command:
./twadmin -m p > ../policy/twpol.txt

To view Tripwire reports run this command
./twprint -m r -r ../report/*.twr → the * in this command is meant to demote your latest twr file

To scan what changes have been made to the system, cd into this directory /usr/local/tripwire/bin and run
./tripwire -m c
To email these changes to the email address listed in the config file, run ./tripwire –m c -M