Task I’m trying to accomplish: I have a command I’m trying to run against our Mac laptops. The command reads a file for the date when the user last changed their password. So I know how I can execute that script using BigFix, but my problem is not knowing how to get that data back to some sort of text file on the BigFix server and/or just being able to store the actual date somewhere in BigFix.
In other words, since I don’t know a lot about bigfix fixlet authoriing, all I’ve ever done is have the relevance return “true” or “false” type of thing. Whereas now I’m trying to get the actual data returned so that I can create a custom script against it to auto-email users, etc.
Oh and also, end-goal could also possibly setting up a BigFix report that shows these dates extracted from the file…and/or have a report that only shows dates that are older than 90 days from current date.
I’d recommend taking a look at the many Mac related analyses available on BigFix.me for examples of how to write relevance to return values other than True/False.
If you shared the script you are using to get this date, it would help me determine how to write the relevance that would do the same.
In some cases it is not simple to write relevance to return something directly, so the work around is to use a task that runs periodically on endpoints and outputs the desired data to a text file or plist, then read that result in using relevance. It is better if you can do it without needing to run an action periodically, but in some cases this is the only method.
Thanks, I forgot about bigfix.me so I’ll look there as well.
The shell command I run on the Macs is:
dscl . -read /Users/username PasswordPolicyOptions | sed -n ‘/passwordLastSetTime/{n;s@.(.)@\1@p;}’
I know I can create a shell script and run it using a BigFix job, but that’s the extend of what I know how to do at this point. I’ve done that before to execute installers, etc., but never for something like what I want to do here.