How to Remove Adobe Flash with LANDESK Management Suite

Do you think it’s time to remove Adobe’s Flash Player from your OS X boxes?  One glance at the Common Vulnerabilities and Exposure’s latest update should get you motivated!

If that doesn’t work, check out Ars Technica’s latest blog on the details of the two 0-day exploits.

It is passed time to remove Flash.   Get it out of your environment and get it out now.

Luckily, removing Flash is not very difficult.  With the simple script below, Flash can be quickly relegated to the depths of trash bin, never to be recovered.

#!/bin/bash

UninstallFlash=(

"/Applications/Utilities/Adobe Flash Player Install Manager.app"

"/Library/Internet Plug-Ins/Flash Player.plugin"

"/Library/Internet Plug-Ins/flashplayer.xpt"

"/Library/PreferencePanes/Flash Player.prefPane"

"/Library/Receipts/Adobe Flash Player.pkg"

)

for FlashObject in "${UninstallFlash[@]}"; do

rm -rf "${FlashObject}"

done

If you’re a LANDESK customer, you can create a package file out of the script if you would like, following the steps outlined in the previous blog post on the “The 3 Step Process of Bundling Scripts with Pkgbuild for a Payload-less Package Deployment

For our Adobe Flash instance, an abbreviated version of 3 steps will be as follows:

Step 1 – Create a “Remove Adobe Flash” folder structure and build script for the PkgBuild utility.  Insert the code below for your “package_the_script.sh” script, changing your identifier as needed.

#!/bin/bash

PKG_ID=Remove_Adobe_Flash

sudo pkgbuild --identifier com.appleintheenterprise.$PKG_ID --nopayload --scripts ./scripts ./$PKG_ID.pkg

 

Once saved, run the command “sudo chmod a+x package_the_script.sh” to ensure execute permissions are set.  You may also want to sign the package if using Gatekeeper.

Step 2 – Copy the Uninstall flash script in the beginning of the article into the Scripts/postinstall file

#!/bin/bash

UninstallFlash=(

"/Applications/Utilities/Adobe Flash Player Install Manager.app"

"/Library/Internet Plug-Ins/Flash Player.plugin"

"/Library/Internet Plug-Ins/flashplayer.xpt"

"/Library/PreferencePanes/Flash Player.prefPane"

"/Library/Receipts/Adobe Flash Player.pkg"

)

for FlashObject in "${UninstallFlash[@]}"; do

rm -rf "${FlashObject}"

done

Step 3 – Create the Remove_Adobe_Flash Package by opening Terminal and browsing to wherever you saved your package_the_script file.  Once there, type “sudo ./package_the_script.sh”.  So doing should create your uninstaller package.  Now, zip the pkg file and copy it to your software distribution share and build your LANDESK deployment package.

  • From the LANDESK Console, open Tools > Distribution > Distribution Packages
  • Inside the menu tree, highlight My Packages or Public Packages and then select the New Package button on the menubar and select New Macintosh Package
  • Give the package a name, description and point the primary file to the zip file created previously
  • Fill out the Metadata details if desired
  • Save the package

To create a task to deploy your LANDESK package, walk through the steps below:

  • Right click on the package created and select Create Scheduled Task
  • Target the desired machine(s), user(s) or query(ies)
  • Right click on the task and select properties
  • Set the desired Task type under Task Settings
  • If you desire the end user to be able to initiate the task, set the radio button in the Portal Settings to either Recommended or Optional, otherwise set it to Required and it will automatically begin the upgrade during the next maintenance window
  • Change the Reboot Settings on the task to one that forces a reboot
  • Schedule the task

To validate your success, browse to http://www.adobe.com/software/flash/about/ on the machine and you should see that the plug-in is missing.

2 thoughts on “How to Remove Adobe Flash with LANDESK Management Suite

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s