[Casper] Script help
Nichols, Jared
jared.nichols at ll.mit.edu
Tue Nov 25 06:05:59 PST 2008
Hi all-
I took the suggestion of scanning the plist and just backed out the scope a bit. I'll let the script speak for itself. Feel free to modify for your own use:
(attached as well)
#!/bin/sh
################################################################################################
##### Filename: vsinfo.sh #####
##### Author: Jared F. Nichols #####
##### Purpose: Report VirusScan information to central server in the form of a text file. #####
##### #####
##### This script requires the installation of the Jamf binary, though the 'mount' command #####
##### could be used for share mounting and networksetup for hostname. #####
################################################################################################
## Set a variable to call the file. In this case, the name that Jamf has for the computer.
## Use sed to remove the XML tags.
filename=`jamf getComputerName | sed -e 's/<computer_name>//' -e 's/<\/\computer_name>//'`
## Use the Jamf binary to mount our file share. In our case, a guest write-only share on our JSS
jamf mount -server LLOSX1 -share DATlogs -type afp
## Now that we have a name we're giving the file and a place to put it, read our info from the
## McAfee plist file directly to the file share, overwriting anything already there.
defaults read /Library/Preferences/com.Mcafee.VirusScan > /Volumes/DATlogs/$filename
## Unmount our share forcibly. Forcibly because the file we need has been written and we
## don't want to throw any errors to the user.
umount -f /Volumes/DATlogs
exit 0
On 11/24/08 11:53 , "Ernst, Craig S." <ERNSTCS at uwec.edu> wrote:
For sure...don't write an entire new system like I suggested...how absurd...
http://www.jamfsoftware.com/jamf_nation/resourcekit.php
Craig E
On 11/24/08 10:39 AM, "Nick Amundsen" <nick at jamfsoftware.com> wrote:
Hi Jared,
It appears that VirusScan does not include the uvscan command anymore, but this information is now available in a plist located in /Library/Preferences/com.Mcafee.VirusScan.plist.
The virus DAT version can be scanned by running:
/usr/bin/defaults read /Library/Preferences/com.Mcafee.VirusScan Update_DATVersion
The script in the Resource Kit can be modified a bit to provide similar reporting as the Virex script by using this command in place of the uvscan command. Once modified, this script can be run via policy or a Casper Remote action to report the definitions to the JSS.
Hope this helps. Just a reminder to folks - if there are other questions related to items provided in the resource kit, or if you have ideas for future features of the Resource Kit, feel free to drop a line on the Resource Kit mailing list. We have created that list in an effort to separate traffic and ensure that the lists are specialized by product.
Thanks!
Nick Amundsen
JAMF Software
Resource Kit Team
On 11/24/08 9:17 AM, "Nichols, Jared" <jared.nichols at ll.mit.edu> wrote:
Hi-
What's the best way to have a machine report its DAT anti-virus level? We use McAfee VirusScan 8.6.1, which stores its dats in /usr/local/vscanx/dats. All I really need is an "ls" on that folder as the folders contained within "dats" are the dat levels, e.g. "5443" for the most recent. The resource kit has a nice script, but it's for Virex. VirusScan doesn't have the uvscan command that the script references (or at least not that I'm aware of)
Anyway...
At my old job I used Apple Remote Desktop and could just display the results of an LS command on my admin workstation. How do I get something similar with Casper?
I was thinking that I'd have a script do an LS on /usr/local/vscanx/dats and pipe that to a file that used a query to networksetup to name it the name of the computer. Then, I'd copy it to my CasperShare. Wrong way about it?
Thanks!!!
j
--
Jared Nichols
ISD Infrastructure and Operations - Desktop Engineering
MIT Lincoln Laboratory
244 Wood St.
Lexington, MA 02420-9108
(781) 981-5500
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://list.jamfsoftware.com/pipermail/casper/attachments/20081125/c5b45947/attachment.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: vsinfo.sh.zip
Type: application/octet-stream
Size: 1130 bytes
Desc: vsinfo.sh.zip
Url : http://list.jamfsoftware.com/pipermail/casper/attachments/20081125/c5b45947/attachment.obj
More information about the Casper
mailing list