0 Replies Latest reply on Jun 22, 2010 6:02 PM by Roturgo

    LinuxShield 1.5.1 Manual Update Script

      Here's a little script that I wrote and use to run manual updates on some of our Linux servers when they get built or fall behind in DAT files.  Thought I'd share it with the community

       

      ------------------ Begin Script --------------------

       

       

      #!/bin/bash

       

      #####################################
      #                                                             #
      #    Update LinuxShield DAT and Engine    #

      #                                                             #
      #####################################

       

      # DAT Version - Update with appropriate version
      DAT_Ver=6021

       

      # Location for DAT and engine update files
      Temp_Files=/tmp

       

      # LinuxShield Install Location
      LS_Inst=/opt/NAI/LinuxShield

       

      # Stop LinuxShield service
      /etc/init.d/nails stop

       

      # Update DAT files & set appropriate permissions
      cp $Temp_Files/avvdat-$DAT_Ver.zip $LS_Inst/engine/dat/
      cd $LS_Inst/engine/dat/
      unzip -o ./avvdat-$DAT_Ver.zip
      chown root:nailsgroup *

       

      # Update engine
      cp $Temp_Files/avengine.zip $LS_Inst/engine/lib/
      cd $LS_Inst/engine/lib/
      unzip -o ./avengine.zip

       

      # Start LinuxShield service
      /etc/init.d/nails start

       

       

      ------------------ End Script --------------------

       

      Prep work:

      1. Place a copy of this script in the /tmp folder on your Linux server (I call it MLS_Update.sh)
      2. If you changed the LinuxShield install location from the default, modify the LS_Inst variable with the path of your LinuxShield install
      3. As root, make the script executable: (chmod +x MLS_Update.sh)
      4. Pull down the latest DAT file from ftp://ftp.mcafee.com/commonupdater/ (the avvdat-####.zip file) and put it in /tmp
      5. Change the DAT_Ver number in this script to the DAT version that you downloaded (the #### portion of the zip file)
      6. Download the latest Engine from the McAfee Download portal (Downloads -> Security Updates -> Engines -> Linux Engine Package for Use with ePO)
      7. Extract the avengine.zip file from the Linux Engine Package and place it into /tmp
      8. As root, run the script and let it update away    (./MLS_Update.sh)

       

      To make life a little easier on myself, I bundle the Engine, update script, and DAT file into a tarball so that I can just drop it on whatever server I need to update and then untar and execute it.  The Engines don't change all that often, so you probably won't have to update it all too frequently.  The DAT file is a different store, but you can easily use wget to pull down the new DAT file and modify the script with the new DAT file version number before running.

       

      Hope this helps! 

       

      Reference KB Articles:

      KB57734 - https://kc.mcafee.com/corporate/index?page=content&id=KB57734

      KB57736 - https://kc.mcafee.com/corporate/index?page=content&id=KB57736

      KB60824 - https://kc.mcafee.com/corporate/index?page=content&id=KB60824