So every now and then I'll post an EA we're using to find various things. We find that EAs are becoming much better at reporting for us to give us an overview on how secure we are.
I present to you my EA for determining a user's screen saver time setting:
#!/bin/sh
currentUser=who | grep console | awk '{print $1}'
fileLocation=find /Users/"$currentUser"/Library/Preferences/ByHost/ -name com.apple.screensaver.* | head -1 | awk '{gsub(/.plist/, "")}; 1'
totTime=defaults read "$fileLocation" | grep idleTime | awk '{print $3}' | awk '{gsub(/;/, "")}; 1'
echo "<result>$totTime</result>"
If someone has a better way to make it more efficient, please little r me and we can talk. This gives us a good baseline in determining how safe our laptops are.
--------------------------
David Marcantonio
davidmarcantonio at me.com