krypted.com

Tiny Deathstars of Foulness

For some reason the uninstaller from Symantec doesn’t work in removing Norton (NAV 10). My guess, without delving into their uninstaller too deeply is that they ran into what I ran into, which is that the com.symantec.* processes are prefixed by a bracketed alphanumeric sequence. To get around this I listed them and used grep to grab each one, then awk to grab the label and did a launchctl stop against the label name once I had it. The rest of this script is pretty straight forward forcing the rm of each of the contents of the items from the snapshot plus the items from the pkg BoM. ┬áHere’s the script, or you can download it here:

#! /bin/bash
launchctl stop `launchctl list | grep com.symantec.SymSecondaryLaunch | awk ‘{print $3}’`
launchctl stop `launchctl list | grep com.symantec.scanNotification | awk ‘{print $3}’`
launchctl stop `launchctl list | grep com.symantec.diskMountNotify | awk ‘{print $3}’`
launchctl stop `launchctl list | grep com.symantec.quickmenu | awk ‘{print $3}’`
kextunload -b com.Symantec.SymEvent.kext
kextunload -b com.Symantec.SymOSXKernelUtilities.kext
kextunload -b com.Symantec.kext.KTUM
rm /etc/liveupdate.conf
rm /etc/Symantec.conf
rm /usr/bin/symsched
rm /usr/bin/navx
rm ~/Library/Preferences/com.Symantec.Scheduler.plist
rm /Users/Shared/snorosx
rm -rfd /Library/Contextual Menu Items/NAVCMPlugin.plugin
rm -rfd /Applications/Symantec Solutions
rm -rfd /Applications/Norton AntiVirus
rm -rfd /Library/Receipts/NAVContextualMenu.pkg
rm -rfd /Library/Receipts/NAVEngine.pkg
rm -rfd /Library/Receipts/Norton AntiVirus.pkg
rm -rfd /Library/Receipts/SymEvent.pkg
rm -rfd /Library/Receipts/SymOSXKernelUtilities.pkg
rm -rfd /Library/Receipts/NortonQuickMenu.pkg
rm -rfd /Library/Receipts/SymSharedFrameworks.pkg
rm -rfd /Library/Receipts/Norton AutoProtect.pkg
rm -rfd /Library/Recepits/Symantec Scheduled Scans.pkg
rm -rfd /Library/Recepits/Symantec Scheduled Scans.pkg
rm -rfd /Library/Recepits/Symantec Scheduled Scans.pkg
rm -rfd /Library/Receipts/navx.pkg
rm -rfd /Library/Receipts/LiveUpdate.pkg
rm -rfd /Library/Receipts/Symantec Scheduler.pkg
rm -rfd /Library/Receipts/Stuffit.pkg
rm -rfd /Library/Receipts/SymInstallExtras.pkg
rm -rfd /Library/Receipts/SymHelpScripts.pkg
rm -rfd /Library/Receipts/SymantecUninstaller.pkg
rm -rfd /Library/Receipts/Symantec Alerts.pkg
rm -rfd /Library/Application Support/Norton Solutions Support
rm /Library/Application Support/NAV.history
rm -rfd /Library/Application Support/Symantec
rm -rfd /Library/PreferencePanes/SymantecQuickMenu.prefPane
rm -rfd /Library/PreferencePanes/APPrefPane.prefPane
rm -rfd /Library/PrivateFrameworks/SymAppKitAdditions.framework
rm -rfd /Library/PrivateFrameworks/SymBase.framework
rm -rfd /Library/PrivateFrameworks/SymNetworking.framework
rm -rfd /Library/PrivateFrameworks/SymSystem.framework
rm -rfd /Library/PrivateFrameworks/SymScheduler.framework
rm -rfd /Library/StartupItems/NortonAutoProtect
rm -rfd /Library/StartupItems/NortonMissedTasks
rm -rfd /Library/Documentation/Help/Norton Help Scripts
rm -rfd /Library/Widgets/Symantec Alerts.wdgt
rm -rfd /System/Library/Extensions/SymEvent.kext
rm -rfd /System/Library/Extensions/SymOSXKernelUtilities.kext
rm -rfd /System/Library/Extensions/KTUM.kext
rm /System/Library/Extensions.mkext.NxdE

Oh, since most everything I do on this site requires elevated privileges I usually forget to mention it, but this script will require those…

May 5th, 2009

Posted In: Mac OS X, Mac Security, Mass Deployment

Tags: , , , , ,

At a terminal prompt, it is really straight forward to grab the date, simply use the date command, with no arguments and you will get something similar to the following, including the day, date, time (with seconds), time zone and year:

Tue Apr 15 00:40:07 CDT 2009

In a script this can choose fairly challenging, especially in cases where you just need the date stamp without the time and time zone, etc. Here we’re going to grab the current system date from ESX, OS X or Linux (or whatever OSen really) and then use a variable, currentdate, to put that date, formatted into a pretty standard format, YYYYMMDD:

currentdate=`date ”+%c%m%d” | awk ‘{printf $5}’`

Which will output the date as follows:

20090415

Now, in our shell script we can create files, add lines to files, etc, with the shortened date stamp. Some of you will be using log analyzers that depend, for example, on unix epoch time. To grab the date formatted as such, the following command can be used:

date -j -f “%a %b %d %T %Z %Y” “`date`” “+%s”

The date command isn’t used as much to set time any more, since most systems rely on a Network Time Protocol (NTP) server to supply date and time information. However, it is worth noting that the date command can also be used to set the time on a computer.

April 15th, 2009

Posted In: Mac OS X, Mac OS X Server, Mass Deployment, Ubuntu, Unix, VMware

Tags: , ,

« Previous Page