How To: Check Apple Warranty Status via ARD

How To: Check Apple Warranty Status via ARD

Here is an awesome little script by Scott Russell of the University of Notre Dame. Using the “send Unix command” in Apple Remote Desktop, it can pull the system’s serial number, send the information to Apple’s Warranty Website and then tell you if the machine is under warranty.

#!/bin/bash

# warranty.sh
# Description: looks up Apple warranty info for this computer, or one
specified by serial number on the command-line

# Written by: Scott Russell, IT Support Engineer, University of Notre
Dame
# Created on: Sat Jan 5 16:20:54 EST 2008
# Last Modified: Thu Sep 25 09:29:11 EDT 2008

###############
## GLOBALS ##
###############

WarrantyTempFile="/tmp/warranty.txt"
PlistFile="/Library/Preferences/edu.ND.DSSBranding"

if [[ $# == 0 ]] ; then
SerialNumber=`system_profiler SPHardwareDataType | grep "Serial Number"
| awk -F': ' {'print $2'} 2>/dev/null`
else
SerialNumber="${1}"
fi

[[ -n "${SerialNumber}" ]] && WarrantyInfo=`curl -k -s
"https://selfsolve.apple.com/Warranty.do?serialNumber=${SerialNumber}&countr
y=USA&fullCountryName=United%20States" | awk '{gsub(/","/,"n");print}' |
awk '{gsub(/":"/,":");print}' > ${WarrantyTempFile}`

#################
## FUNCTIONS ##
#################

GetWarrantyValue()
{
grep -w "${1}" ${WarrantyTempFile} | awk -F ':' {'print $2'}
}

###################
## APPLICATION ##
###################

echo "$(date) ... Checking warranty status"
InvalidSerial=`grep "serial number provided is invalid"
"${WarrantyTempFile}"`
#echo "InvalidSerial == ${InvalidSerial}"

if [[ -e "${WarrantyTempFile}" && -z "${InvalidSerial}" ]] ; then
echo " Serial Number == ${SerialNumber}"

PurchaseDate=`GetWarrantyValue PURCHASE_DATE`
echo " PurchaseDate == ${PurchaseDate}"

WarrantyExpires=`GetWarrantyValue COVERAGE_DATE`
echo " WarrantyExpires == ${WarrantyExpires}"

ProductDescription=`GetWarrantyValue PROD_DESCR`
echo " ProductDescription == ${ProductDescription}"
else
[[ -z "${SerialNumber}" ]] && echo " No serial number was found."
[[ -n "${InvalidSerial}" ]] && echo " Warranty information was
not found for ${SerialNumber}."
fi

exit 0

Troubleshooting a Mac – Boot Options

Troubleshooting a Mac – Boot Options

Every once in a while a Mac gets so messed up that it won’t even boot. It’ll sit at the Apple screen, turning away. Or it’ll kernal panic just as it hits the blue login screen.

From Apple’s Support Knowledge Base here is what you need to do.

Resetting PRAM and NVRAM
1. Shut down the computer.
2. Locate the following keys on the keyboard: Command, Option, P, and R. You will need to hold these keys down simultaneously in step 4.
3. Turn on the computer.
4. Press and hold the Command-Option-P-R keys. You must press this key combination before the gray screen appears.
5. Hold the keys down until the computer restarts and you hear the startup sound for the second time.
6. Release the keys.
Your computer’s PRAM and the NVRAM are reset to the default values. The clock settings may be reset to a default date on some models.

If you have an older PPC Model Mac such as a G5 or Powerbook there is an additional step which will help.

Boot into Open Firmware by holding down the ‘Command-Option-O-F’ keys from a cold start while the chime is being played. You will see a command-line screen…enter these commands:

1. At the Open Firmware prompt, type: reset-nvram
2. Press Return.
3. At the Open Firmware prompt, type: reset-all
4. Press Return.
Example:
0 > reset-nvram
Press Return
0 > reset-all
Press Return

The reset-all command should cause the computer to restart. If this occurs, you have successfully reset the Open Firmware settings.

OSX 10.5.7 Update Issues

OSX 10.5.7 Update Issues

It’s comforting to know that when Apple screws up, they do it but good.

Not since the days of Tiger has a dot release from Apple done so much damage. On the surface, 10.5.7 is a very important update. A lists of fixes includes the usual round of security fixes, fixes for network performance, updates for Camera RAW support, among several other fixes. But, initially the Software Update version was throwing up errors “digital signature for the package is incorrect.” Apple rapidly fixed this but it underscores the importance of having good backups and a clean file system.

Afterwards, others started reporting BSOD or Blue Screens of Death after the update was done. Having originated on Windows, the BSOD is now available in Leopard, a nice, if unintended bonus from Apple.

Luckily this problem seems to be fairly easy to fix:

  • Wait for Hard drive access to stop
  • Hold Power button down until computer shuts off
  • Hold shift button down and power computer on to boot into safe mode
  • Use regular user name and password to login if asked
  • type reboot to reboot the computer
  • The next issue to commonly pop up is messed up display resolutions for non-Apple monitors. People are finding themselves stuck in 1920×1080! Resetting the PRAM (Hold down the Command, Option P and K keys while booting until it chimes three or four times) seems to fix for some.

    For some of us REALLY unluckily people, the update gets stuck part way. After letting it sit for an hour at 33% there was no choice but to reboot the computer. Upon booting back up, OS X is not able to fully boot up. In one machine I was able to fix by going into safe mode, then issuing the softwareupdate -l -a command to finish the download and install.

    On my Macbook, it was a full reinstall.

    How To: Disable ._ Files and .DS_Store on Network Shares

    How To: Disable ._ Files and .DS_Store on Network Shares

    In heterogeneous networks of Macs and Window users, few things tick off Windows users then the “droppings” Macs leave behind in the form of files with . or ._ in front of them. These files are known as resource forks on the Mac side and store all kinds of really nifty information that makes OS X interact with files quicker and more efficiently. Among their uses they store metadata about files such as keywords, file size, and preview information.

    None the less for various reason Windows (and to a lesser extent, Linux) is not able to always ignore these files and automatically sorts them to the top of the file view list. These files tend to be confusing if one is not aware of what they are. Or worse yet cause problems in directories with thousands of files present.

    If on a small network with only a few Macs there is a program that takes care of this automatically. For $13 BlueHarvest works just perfectly.

    Of course there is a simple trick to disable .DS_Store files. In Terminal run the command:

    defaults write com.apple.desktopservices DSDontWriteNetworkStores true

    If the network is Leopard only, then editing nsmb.conf is a good trick too. In /etc/nsmb.conf look for the following line: streams=no and change to streams=yes .

    If the file does not exist, then it can be created via TextEdit or VI.

    These files are only viewable under very certain circumstances but they can cause a lot of coworker friction, and worse yet even cause management to question the usability of OS X in the work place. These simple tricks will go a long ways to resolving those issues and making work much more friendly.

    How To: Synchronize Blackberry and Zimbra on OS X

    How To: Synchronize Blackberry and Zimbra on OS X

    At first looks there is no obvious way to synchronize RIM’s Blackberry devices with the Zimbra mail client. Blackberry already has a huge following in the business world while Zimbra is starting to become extremely popular as an Exchange replacement.

    But, out of the box neither will talk to each other directly on OS X.

    This can be resolved, but it’s actually a two step process so it will take a little bit of extra work to be sure that data does not get out of date.

    Zimbra provides Apple iSync Connector which is currently bundled in the Network Edition Professional Server download, available in the trial version (signup required) or from the Admin Console in an already existing Zimbra install.

    Install the iSync Connector with the directions here.

    Once the connector is installed it’s a good idea to go ahead and do the initial synchronization. This will sync Calendar, Contacts, Notes, and the Address Book to the corresponding OS X Application. Email will of course not sync since the Blackberry can be setup as an email client and can receive the emails directly.

    After the initial synchronization between Zimbra and the desktop, it’s now possible to sync the desktop with the Blackberry.

    This is done with the PocketMac Application which is a free download for those who already have a Blackberry. It is not free for any other phone or PDA, although it does work with a wide variety of other systems.

    Install PocketMac, plug in the Blackberry, hit the sync button on the dock and watch it all happen like magic.

    Using this scenario it’s possible to get out of sync very easily though. I highly suggest getting in the habit of only making changes to one device ever, or doing this two step sync process immediately after adding or making changes.