Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I am working on a project where we need to be able to tell and report periodically on what software is installed on our various Linux/Unix servers. I have looked at this, How to inventory what software/roles a Linux server is "serving up" to clients?, posting and this, Open-source inventory agent, posting and was not able to locate information that would suggest an answer to my issue. I am not sure that the OCS Agent would report on Linux/Unix servers like it does in Windows. Are there any scripts, open source software, software agents, etc. that can be used to run against a large number of Linux/Unix servers to report on what software is installed and what versions are installed?

=========================

Updates for clarity:

I am looking for a reliable way in which to determine if particular software exists on a Linux/Unix machine. Ideally, this would be a remote solution where I can point it towards the servers in question and have it return the results indicating if the software in question exists on that box or not. Also, should I be concerned about the following issues relating to installed software on a Linux/Unix host?

  1. Software installed from packages
  2. Software installed from source
  3. Software that is installed to an unknown or unexpected location

How would I go about handling these conditions along with finding out if the software exists?

share|improve this question

5 Answers 5

  1. Check package management database
  2. Not perfectly reliable, but scan the entire filesystem for the expected executable or library file names.
  3. Same as #2, but don't count on it if somebody wants to rename netcat to purrmeow, statically compile it, and run it by calling libc instead of a direct execution.

You could try to identify any files using the content of the first few bytes to check for executable magic numbers and then note any that don't have a home. This will take care of accidental or innocent violation installations. You'll be hard-pressed, however, if somebody wanted to put something in place and keep it hidden from you.

To be really sneaky, one could embed an executable in some junk section of file, mmap it, and then memory jump into it. Where there's a will, there's a hacker... so beware of the limitations of whatever method you choose if this is an audit function.

share|improve this answer

This wouldn't actually be all that difficult to script up manually via ssh.

That said, I think you're going about this the wrong way. You ought to start deploying via a configuration management system which will ensure your servers are in a specific, reproducible, version-controlled state.

share|improve this answer
    
I would agree that configuration management is the way to go. That is in the works for new server builds. However, we have a lot of server builds that do not match such a standard. Could you share some more ideas that you had about such a script? –  John May 8 '12 at 15:03
    
Well, I don't have time to write up a real script at the moment, but I just envision something that would ssh into each server, run dpkg -l or rpm -qa, then dump the results into a database or flat files for summarizing/aggregation. –  EEAA May 8 '12 at 15:05

ErikA is giving you sound advice. Instead of guessing what you have running, you should specify what you want running.

But maybe blueprint can help you get from your current state to the one you should be in.

share|improve this answer
    
+1 for using Blueprint to do this. –  ewwhite May 8 '12 at 15:08

What OS are you running? You can pull this information from your system's package manager (rpm -qa), SNMP (using something like snmpwalk -v2c -c communityname hostname 1.3.6.1.2.1.25.6.3.1.2), or a configuration management solution of your choice... The earlier Blueprint recommendation is very good, too.

share|improve this answer

You could take a look at the stand alone linux (Ubuntu, Fedora, etc) audit script for Open-AudIT. It's a bit dated, but should provide what you are after.

http://www.open-audit.org/downloads.php

Disclaimer - I am the developer.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.