(imported comment written by rzm10291)
Reviving this thread because I realized I made an error when creating the relevance. The relevance will tell me if remote management is on or not, but it doesn’t tell me if the etcadmin account that I’m enabling as the authorized remote management account is created. So on a laptop that didn’t have the etcadmin account, the remote management was enabled, but I couldn’t get into the machine! I could change the remote management command to allow all users to control the machine, but I only want machines that have the etcadmin account.
So, here’s what I did with the relevance:
(name of operating system = Mac OS X AND (NOT (exists process whose (name of it starts with ARDAgent))) AND ((exists file /var/db/dslocal/nodes/Default/users/etcadmin.plist) OR (exists file /etc/httpd/users/etcadmin.conf)))
The issues I have are with the different ways accounts were stored between 10.4 and 10.5+. 10.5+ uses plist files in /var/db/dslocal/nodes/Default/users for all users on the machine. 10.4 does not, and it doesn’t look like it’s easy to determine if the account is created. I see that a httpd configuration file is created for the user when it’s made, so I made my relevance off that files existence.
This all seems unnecessary to me because I would have expected that BigFix could tell if a user is already created on the machine. I see that BigFix can tell who the current user logged in is, can it determine if a user account is created on the machine too?
If not, and in addition to this question, can I run shell commands within relevance and use the output in if/then statements?