Skip to main content

Here 's a simple way to get the specific version of Centrify running.

!/bin/sh

mode=adinfo --version | grep "CentrifyDC" | awk '{print $3}'

if [ "$mode" == "5.3.3-602)" ]; then echo "<result>Centrify v5.3.3 Installed</result>"
elif [ "$mode" == "5.3.0-213)" ]; then
echo "<result>Old Centrify Version v5.3.0x Installed</result>"
elif [ "$mode" == "5.2.4-465)" ]; then
echo "<result>Old Centrify Version v5.2.4x Installed</result>"
else echo "<result>NA</result>"
fi

FYI, might want to wrap your EA using this code button:

#!/bin/sh
echo "<result>MyAwesomeScriptResult</result>"




I made some changes so this script does not stale date.

#!/bin/sh

mode=`adinfo --version | grep "CentrifyDC" | awk '{print $3}'`

if [ "$mode" != "" ]; then
    echo "<result>Centrify v.${mode//)} Installed</result>"
else
    echo "<result>Centrify Not Installed</result>"
fi

Thanks MandyDroid. How are you doing?


HI Everyone, I could use some help with this EA. I am using the EA exactly as @MandyDroid posted above. On the first Inventory report it will report the exact version that is installed. However, on subsequent reports to Jamf Pro, the same machine(s) will report as "Centrify Not Installed" or vice versa . While every Mac we have has Centrify installed, approx. 15% show a version number, the others "Centrify Not Installed" and it appears to be random. I am have trouble figuring out just when the EA picks up one result vs. the other. Can anyone see in the script were this might be occurring or why the server is getting different results? Any help troubleshooting this EA is greatly appreciated as I have an upgrade of the Centrify client that I need to get going.

Cheers!


Problem with this approach (and EA) is that it will need to be updated with every new release of Centrify since those versions are hard-coded.

Much much easier approach here:

#!/bin/bash

CentrifyVersion=$(/usr/local/bin/adinfo -v | cut -c 20-24)
echo "<result>$CentrifyVersion</result>"

exit 0

Taylor your extension attribute was helpful!

Thank you sir