Posted on 01-06-2017 09:47 PM
Here 's a simple way to get the specific version of Centrify running.
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
Posted on 01-07-2017 07:28 PM
FYI, might want to wrap your EA using this code button:
#!/bin/sh
echo "<result>MyAwesomeScriptResult</result>"
Posted on 08-16-2017 11:22 AM
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
Posted on 12-20-2017 08:40 AM
Thanks MandyDroid. How are you doing?
Posted on 07-03-2018 01:18 PM
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!
Posted on 07-26-2018 07:57 AM
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
Posted on 03-30-2022 02:45 PM
Taylor your extension attribute was helpful!
Thank you sir