Automatic Groups for Linux and Best Practices

What would be the best way to filter Linux machines into an Automatic Group? At my company, we have been using a registry entry that we give to the system owners to separate our Windows Server. What would be the equivalent for Linux since it does not have a registry? I was thinking of using Bigfix Relevance to search for a particular file under /etc. Would this code work? I am testing it in my environment but have not had any hits yet. Thanks for everyone’s help.

name of operating system as lowercase starts with “linux” AND exists file “/etc/bftest”

That would probably be the route I would go with, might consider dropping your identifier next to the BESclient config file /var/opt/BESClient/ but, I believe Linux conventions would lean more towards /etc

In the past, we went about it the way you are. Registry entries for Windows and files for Linux. Just recently, we started to try to standardize server details across both platforms. Here is the relevance for one of the properties we use (“Location”):

if (exists file "our-properties-filename" of parent folder of data folder of client) then ((following texts of first "Location:" of lines of it) of file "our-properties-filename" of parent folder of data folder of client) else ("Not Set")

This works on Linux and Windows and searches for a file named “our-properties-filename” in the parent folder of the data folder of the BigFix client (/var/opt/BESClient on Linux and C:\Program Files (x86)\BigFix Enterprise\BES Client on Windows). With that, now we just have a standard set of properties instead of Windows-Location and Linux-Location.

1 Like

Hi M,

Thanks for your reply. So am I correct that for the example given I would need to place the location say Lab1 after location as followed “Location:Lab1”?

Ah yes! I forgot to give a sample syntax of the file.

Location:North America

Worked like a charm! Thanks everyone for your help.

Q: unix of operating system
A: True
T: 169307

This should be TRUE on non-windows non-macs. (Linux+Unix)