Intro

ET OSX is a list of useful tools for the MacOS X, most of which live in the Applications folder on my startup drive. It started as a 'what's on my Mac' page on my personal site but quickly evolved into a blog of its own. I'm trying to focus most on of the tiny but useful utilities that sometimes save you lots of trouble and effort, and to omit for the most part the list of big guns, that one normally uses on a daily basis. The list serves two purposes, lets me easily answer 'how do I do this on the Mac' questions asked by other users, and helps me remember answers to the same questions myself.
Showing posts with label Admin Stuff. Show all posts
Showing posts with label Admin Stuff. Show all posts

Tip: Connecting MacOS X Tiger Clients to Win2003 File Servers

I remembered the hard way (or rather I remembered while reading this post on Apple's discussion forums and a howto on macrumors.com) that Apple's Samba implementation (the built-in software that allows you connect to Windows computers) doesn't support digitally signed communication. What does this mean for the average Mac OS X user? If he or she tries to connect to a Windows 2003 - based file server, chanced are they'll be greeted with a non-descriptive error message about deleting or fixing the server alias. Win2003 Server is configured to encrypt all communication with its clients, so to be able to serve files to MacOS X users, the administrator should add two security options:

Microsoft network server: Digitally sign communications (always) -> set to "Disabled"
and
Microsoft network server: Digitally sign communications (if client agrees) -> set to "Enabled"

and this will hopefully fix the issue.

Install Leopard beta without dvd-dl burner drive

Attending developers at this year's WWDC were given preview copies of Mac OS X's next major release 10.5 a.k.a. Leopard which was firs demoed exactly an year ago at WWDC'2006. The developer betas come as 6GB+ disk images, so in order to install them you have to burn the image to a dual layer DVD. Chances are your computer's not equipped with a dvd-dl burner drive (or if you're like me you have a dvd-dl burner but you don't want to waist a dvd-dl disc). In such case you can consult the seed note that came with your Leopard image, which explains that you can test Mac OS X beta if you have a Mac with 3 partitions:
Step 1: You download Leopard beta on your working boot partition
Step 2: Then clone the Leopard image on the second partition using Disk Utility
Step 3: Boot your computer from that second partition and install from it on the third one.
Trust me, it really is easier than it sounds. (If you don't have 3 partitions or disks available check out this post describing how to create them without loosing your data). Of course this whole process works with other type of installation for which you should boot from the installing media.
To make things even more interesting, you can stop at Step 2 above, then use System Preferences to restart your Mac in Target Diskt mode (or just restart and keep the T key pressed until you see the big FireWire logo on your screen). Now you can connect any other Mac via FireWire and start form your Leopard installation partition which will now act like an external disk drive for that new computer.
Then again, you can take the easy way out and just burn that dvd after all.

Live re-partitioning, unix style

Since Mac OS X 10.4.6 the built-in diskutil tool (Disk Utility.app's CLI brother) supports live repartitioning of the boot volume. The feature became very popular with different macos x related forums because of Bootcamp Assitant which first introduced it. In short words it allows you to reformat your Mac's built in hard drive without loosing your data. If you don't fear the command line interface, here's how to do it:
-Launch Disk Utility.app to find your boot volume's disk identifier - select it from the list of volumes to the left, then click on the (I)nfo icon on top. It should be something like 'disk0s3'
- Fire-up Terminal.app and issue the following command:


sudo diskutil resizeVolume disk0s3 limits

which will give you info how big your volume can grow or shrink to
!!! Important !!! When creating new partitions make sure you have enough free space on your drive to accomodate them (makes sense)
now decide upon the number of new partitions you need to create and what their format will be. Create them with:
sudo diskutil resizeVolume volumeName newPartitionFormat newPartitionName newPartitionSize, i.e.

sudo diskutil resizeVolume disk0s3 JHFS+ Tiger 30G JHFS+ Backup 20G

which will add 2 more partitions next to my existing volume, first one named Tiger (30Gigs in size and formated as Journaled HFS+) second one named Backup (20GB, again Journaled HFS+). After resizing the volume diskutil will ask you to restart and you will then need to erase the newly created partitions, using either diskutil (diskutil eraseVolume) or Disk Utility.app.
Update: the diskutil resizeVolume command unfortunately supports only GUID Partition Tables. PPC Macs can not boot from GPT formated disks, so I'm afraid live resizing is off limits to them. Good news is that if your drive was formated as Apple Partition Map or Master Boot Record you still don't have to re-format it. You can use BootCamp assistant to create a 'Windows' partition which will do the job for you.

Howto: Automate backups to external drive with Check For Disk

Thanks to the wonderful Automator action Check for Disk made available from automator.us, you can setup an Automator workflow that will execute your backup script/launch your backup app every time you plug that external volume in your computer. Here's what you have to do:
1. Go to automator.us to download & install the Check for Disk action; read the online example while your at it.
2. Start up Automator.app and create a new workflow and add Check fro Disk as the first action. Setup any number of disks you want to backup to using the examble on automator.us as a guide
3. Add a second action, which depending on what you want to do could be 'Launch Application', 'Run AppleScript' or 'Run Shell Script' setting the 'Ignore results from previous action' will probably help you.

And that's it! each time your backup volume of choice is mounted on your desktop the script/application will be launched in my case PsyncX is launched and I have to manually press the previously created backup item. I could potentially make a shell script that calls psync directly I prefer to leave it like that.

Back up your MacOS X based computer

Most of today's Macs sport hard drives of 100+ gigs and more, which you'll be happy to fill with movies, audio songs, images and what not, but the more that heap of files of yours grows in size, the more critical it grows for your digital lifestyle. What will you do disaster strikes and you loose all those mp3 fies? Well, apart from re-ripping hundreds of CD's you could restore your files from your backup copy, provided you have one. In order to be useful, a backup copy should be up-to-date, complete and functional. And in order for the copy to be up-to-date, the backup mechanism should be easy enough so that the users don't hesitate to use it. Better yet, it should be altogether transparent for the users. One of the relatively cheap backup solutions is to have an external hard drive big enough to hold all your documents and tool that can make an exact copy of your files from your startup disk to the external one. A good option is to make an exact copy of the whole disk, so that boot up your computer from it if something bad happens. Let see if there are any tools for the MacOS X out there that provide that functionality.

First I should mention Apple's own tool, Backup.app. AFAIK Apple only offer this one as part of their .Mac service - the online storage, web site and & email hosting form Apple that costs you about $100 per year. .Mac offers you nice functions such as AddressBook Contacts syncing between multiple Macs etc, but your iDisk is only good for 1G of online storage and 10GB of monthly traffic, so I've always thought of it as an easy way to share files with others, not as a backup solution. Backup.app however, can do fancy stuff like selective files/folders as well as whole volume backups, it lets schedule backups and also lets you spread-backup your file to multiple optical discs (I usually give up at the point Backup.app tells me I need 73 empty DVDs to backup my Pictures folder). If you already use .Mac give Backup.app a try, otherwise $100 is a bit too much for such an tool.

CarbonCopyCloner is an old-school backup utility that recently has been made compatible with current Intel-based Macs. It can do full disk-to-disk clones for you, selective backups of files and folders, it can do backups over the network to a remote hosts and can schedule repetitive tasks. CCC handles scheduled backups very intelligently, for example if the destination volume is not presented at the time scheduled for backup, CCC can re-run the backup attempt at the moment the volume is re-attached. The easiest thing CCC shines with is the ability to create a complete clone of one volume to another, preserving all the file prorperties. If you're looking for a tool that can create a bootable copy of your current drive CCC might be the answer. One thing CCC doesn't do thought is the backup to multiple optical disks think that Backup.app is proud of.
CCC is made by Bombich Software and is distributed as shareware, but all features are available to the user whether he chooses to donate to the developers or not. It supports versions of MacOS X back to 10.2 (Jaguar)
(Note: version 3 of CCC is currently at a beta testing stage. One of the important new features it will introduce is the ability to do incremental backups, that is, to only backup files that have been changed since the last time you've used the app.)


Clearly the the most sophisticated interface is provided by SuperDuper! made by software developers Shirt Pocket. It offers several backup scripts - full backups, incremental backups, copy only shared user data, copy user data with applications, etc. The applications issues warnings before every action takes place. There is also nice descriptive text in a "What is going to happen?" textbox, explaining to the user exactly how his files will be affected. SuperDuper! alse lets you schedule backups, which is an easy way to make sure your backup copy is always up to date. This utility is the perfect choice for the novice backuper.
You can download SuperDuper! and use its basic functionality for free, but if you want any of the advanced options like schedules or incremental update or scripting you'll have to buy the full version, currently priced at $27.95. One thing I do not like at all about SuperDuper! is that the developers didn't grey-out the controls for features to give you a clear idea what you can and what you cannot do with the free version. Instead, each time you hit a button for an unavailable option you get a cheerful popup that politely asks to go and buy the real stuff. Well, maybe it is a personal thing.



PsyncX is a graphical tool developed by David Baker, which is built around the command line utility called psync, in turn developed by Dan Kogai. psync can make backups and restores preserving HFS+ file attributes, something traditional UNIX tools are not able to do. The GUI tool PsyncX offers you many advanced backup features, such as partial or full backups, make bootable backup volumes, backup to external disks, to disk images or to remote volumes over the network AND do scheduled backups. It does all this for free, accepting donations for author David Baker.

(Note for advanced & adventurous users: MacOS X Tiger comes with a version of rsync that makes copies and restores preserving the proper state of HFS+ attributes, resource forks, ACLs and what not. However, be aware that certain problems have been reported even with the most up-to-date version, shipped with 10.4.9. There are also many other UNIX based tools, such as rdiff-backup for example, which you can build a backup strategy around.)

The Verdict

My cuurent choice for personal backups lies with PsyncX, because it offers me a combination of features that I think are vital for a successful backup strategy - ease of use, so I don't put off using it and find out I've missed a whole month when my data is ruined, incremental backups, so backups take minutes and not ages and the ability to have a bootable copy of my startup drive available just in case.

RBrowser


RBrowser (www.rbrowser.com) - afaik a unique remote GUI-enabled file system browser for the MacOS X. Supports various protocols, such as sftp-ssh, ssl/tls-enabled ftp, plain old ftp. The gui is very similar to MacOS X's column view, so new users feel at home, and can perform sophisticated tasks as remote-to-remote folder synchronization by simply dragging and dropping between two Finder-like windows. Very useful for web site maintainers, allowing them to work on a local copy of the web site contents and easily auto-sync all between local and remote no matter what the protocol needed. Also useful for backups. Comes completely free (ftp and sftp) or you can purchase a license for $35 allowing you to work with all protocols. I think RBroser has been around since the OpenStep days.

OmniGraffle


OmniGraffle (www.omnigroup.com/applications/omnigraffle) - a diagram and charting tool with very easy, yet very powerful user interface, allowing you to create office layouts, organization charts, UML diagrams or whatever you need to visually describe a process or idea. The diagrams it creates are in a vector format which you can later export to almost anything you want, reducing the process of creating a wall-big chart or diagram to just a few clicks. I'm using it for creating network diagrams form some of my projects, which is where OmniGraffle's plugin architecture comes to play. There is a huge list of plugins or stencils with diagram components available, ranging from HP SAN components to bathroom equipment. OmniGraffle is a commercial application available for $79.95 and you can also get OmniGraffle Professional for $149.95.

KisMAC


KisMAC (kismac.de) - passive stumbler for MacOS X. It can put a WiFi adapter in passive mode, thus turning it completely invisible. Useful for probing upon other people's networks. Supports a long list of third party wireless cards, check site for details. Freeware and published under the GPL.

iStumbler


iStumbler (istumbler.net) - a wireless detection/scanner app, currently has plug-ins for Airport/WiFi networks, Bluetooth devices and Bonjour services. It can show you useful info for each detected service, such as signal to noise ratio, radio channel and so on, which can be very helpful when designing wireless networks.

Fugu


Fugu (rsug.itd.umich.edu/software/fugu) - sftp/scp client with GUI. In fact, the help page says that this is a sftp frontend to the client that normally ships with MacOSX. This utility helps web designers/administrators and all normal users to have secure access to their remote files, which is far better than using plain ftp. Fugu is distributed under the BSD license. Current version is an Universal Application.

CocoaMySQL


CocoaMySQL (cocoamysql.sourceforge.net) - an Objective-C (or Cocoa) based MySQL gui client, one of the first that were available. I've been using it for long years. Funny thing, even now when far more sophisticated clients are availavle from mysql.com and what not, I still prefer to use this one. For one thing, it doesn't mess-up cyrillic data from my databases. PayPal donation-ware.

Remote Desktop Connection


Update: The good folks over at Microsoft's mac mojo blog have just posted info that a beta version of RDC v.2 is available for download from MS's Mactopia site. New in this version is support for Microsoft's (!?) Remote Desktop Protocol v.6 (whatever that is), support for multiple simultaneous sessions (say hell-yeah!), Universal Binary, user interface tweaks, etc. I only had a brief moment in private with RDC v.2 and I'm very pleased to say that one of my last non-universal (as in PowerPC-only) applications is going away. One thing I don't like is I still don't have an easy way to chose a previously saved host (complete with address, username and password) upon application launch, and I need this app to connect to multiple hosts using different usernames and passwords. You have the option to save a host files in ~/Documents/RDC Connections, but double-clicking on one of those still doesn't log you into your server, you have to enter username and password manually. Well, maybe this is a security feature. Although there is this weird 'use Keychain.app' prefference in the UI...


Remote Desktop Connection (www.microsoft.com/mac/otherproducts) - if I had to choose only one piece of software from Microsoft this would probably be it.(Frankly speaking, it is the only piece of software by Microsoft that I'm using) Remote Desktop Connection allows you to remotely control Windows-based computers from the safety of your MacOS X machine, which is nice. Advanced features such as remote resource sharing, drag-and-drop copying make it very useful when you have to support a windows server or two. Best of all it comes to you for free! My only gripe about it would be that it is still a PowerPC only application, but turns out both I and the Mac Development unit at Redmond can live with that.

Remote Desktop, or ARD


Remote Desktop, or ARD(www.apple.com/remotedesktop) - the must have remote management tool for MacOS X system/network administrators. You can think of it as VNC on steroids, crack, whtatever. If you have a bunch of macs to manage you can effortlessly copy items to them, install packages remotely, run unix commands on multiple machines and many more. Client machines can be organized in lists or dynamic (or smart) lists using different criteria such as network range, os version, amount of ram, etc. Administrators can send messages to remote clients and clients can request assistance from administrators. Apple charges around $300 for this one, but I can't stress enough how useful it is.

Chicken of the VNC

Chicken of the VNC(cotvnc.sourceforge.net) - best VNC client for the Mac I can think of. VNC clients allow you to connect to the screen of a remote computer running a VNC server, and somehow have become the network lazy network admin's tool of choice. Very slick interface, support Bonjour and keeps a list of all my servers with usernames and passwords. Universal application. Licensed under the GNU GPL.