/build/static/layout/Breadcrumb_cap_w.png

Scripting the fix for "Admin Alert! showing during inventory updates" on OS X 10.5 systems with Agent version 5.3.53177

The 5.3.53177 release of the KACE Agent contains a bug that causes the "Agent Alert!" icon to appear in the dock during every inventory update, even though it should only appear when an alert is pushed to the client machine. (See this ITNinja Q for more details: http://www.itninja.com/question/admin-alert-poping-on-apple-systems)

To automatically fix this issue on affected OS X 10.5 systems, I have created a script that will apply the necessary plist fix, so that it doesn't have to be manually changed on each affected system.

 

1) First, create a file named plist_fix.sh containing the following: **(The number highlighted in red must be changed to the script # you create on step 3)**

#!/bin/sh
rm -rf /Library/Application\ Support/Dell/KACE/bin/AdminAlert.app/Contents/info.plist
sleep 10
ditto /Library/Application\ Support/Dell/KACE/data/scripts/87/Info.plist /Library/Application\ Support/Dell/KACE/bin/AdminAlert.app/Contents/
sleep 5
sudo /Library/Application\ Support/Dell/KACE/bin/runkbot 4 0
exit 0

 

2) Next, create a copy of the Info.plist file located in ... with the following additional entries at the bottom of the file:

      <key>LSUIElement</key>
<true/>
<key>plist_fixed</key>
<string>Yes</string>
</dict>
</plist>

3) Finally, create an "Offline KScript" and attach the 2 files created above as dependencies, and add the following Job rules:

Verify

  1. Verify that the plist value LSUIElement in the plist /Library/Application\ Support/Dell/KACE/bin/AdminAlert.app/Contents/info.plist exists.

On Success

  1. Log plist already updated to status.

Remediation

  1. Kill the process AdminAlert.
  2. Launch $(KACE_DEPENDENCY_DIR)\plist_fix.sh with params .

On Remediation Success

  1. Log plist for 10.5 client successfully updated to output.

On Remediation Failure

    1. Log plist not successfully updated!!! to output.
 
 
 
 

The Script can be run as a 'one-time' push to all OS X 10.5 machines, or you can create a Custom Inventory Rule and Smart Label based on the plist_fixed key. You can then schedule the script to run regularly on machines which are labled as not having that plist entry.

 

The Custom Inventory Rule I used to identify machines which have had this fix applied is:

PlistValueExists(/Library/Application Support/Dell/KACE/bin/AdminAlert.app/Contents/info.plist, plist_fixed)

 

I then Created a smart label to identify the applicable (10.5) machines which did not yet have this plist entry (Keep in mind we you may have to change the ORG5 prefix to suit your environment):

 

select *, UNIX_TIMESTAMP(now()) - UNIX_TIMESTAMP(LAST_SYNC) as LAST_SYNC_TIME,
             UNIX_TIMESTAMP(MACHINE.LAST_SYNC) as LAST_SYNC_SECONDS
     from ORG5.MACHINE
     LEFT JOIN KBSYS.KUID_ORGANIZATION ON KUID_ORGANIZATION.KUID=MACHINE.KUID

     LEFT JOIN KBSYS.SMMP_CONNECTION ON SMMP_CONNECTION.KUID = MACHINE.KUID

             AND KUID_ORGANIZATION.ORGANIZATION_ID = 5
     where ((((  MACHINE.CLIENT_VERSION like '%5.3.53177%')

      AND OS_VERSION like '%10.5%')

      AND (1 not in (select 1 from ORG5.SOFTWARE, ORG5.MACHINE_SOFTWARE_JT

        where MACHINE.ID = MACHINE_SOFTWARE_JT.MACHINE_ID

          and MACHINE_SOFTWARE_JT.SOFTWARE_ID = SOFTWARE.ID

          and SOFTWARE.DISPLAY_NAME = 'Fixed plist for 10.5 Machines running agent 5.3.53177')) ))

 

With this combination of Custom Inventory Rule, Smart Label, and Script, you never need worry that someone is seeing this bug on their system, as it will automatically apply this fix at the interval you specify in the script!


Comments

This post is locked

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login

Share

 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ