Posted on 05-21-2012 10:24 AM
Hi Everyone. I am just getting rolling on creating Extension Attribute reports and on this one (the 9th one I have created), I hit a snag. I am currently working only with my 10.6.8 computers. I am hoping you can shed some light on it.
I am using the MCX from template- Screen Saver Idle Time. Targeting the Domain ~/Library/Preferences/ByHost/com.apple.screensaver.{IDENTIFIER} .plist file with a Value of 900
I then created the Extension Attribute from the template, Screensaver- Active After X Seconds. which calls out appDomain="com.apple.screensaver.ByHost"
When I built the inventory Smart group to report the Extension Attribute, I set the criteria to Screensaver- Active After X Seconds "is" Pass, ( also tried Pass (true), True, 900 etc.). The problem is that the report comes back with ALL computers reporting- Fail (Domain or Key Not Found). I have checked my (6) 10.6.8 test computers and all have the correct Value of 900 in the .plist.
So this being my first ByHost .plist I have worked with, I noticed that all these .plist(s) have the UUID identifier string, thus each file is different. The Logical explanation is that .ByHost in the appDomain="com.apple.screensaver.ByHost" is a sort of a Wild Card. Is this true? if Not, would I replace .ByHost in the script with .* or some such? *If* .ByHost is a sort of Wild card then where do you think I might be going wrong here? I know this one is right in front of me but I am looking right past it ????? Any thoughts would be greatly appreciated and If I am not clear or thorough enough, I will be happy to provide greater detail.
THANKS All !!!
Posted on 09-20-2012 04:15 PM
user=last -1 | awk '{print $1}'
idleTime=defaults read /Library/Managed Preferences/$user/complete | grep -A6 'com.apple.screensaver.ByHost' | grep value | awk '{print $3}' | cut -f1 -d';'
echo "<result>$idleTime</result>"