AIDE : Variable Value Setting



Those variables were custom-made for this documentation, and are not a part of the AIDE package. So, if these directions are being followed for the first time, the values are not likely to be pre-set. Though the AIDE program does not strictly require making environment variables, these directions do. The simple reason for this requirement is just so that subsequent directions can use those environment variables, and that simplifies some of the later instructions. (The logical alternative that wouldn't require these variables may end up showing the same command multiple times, and that ends up unnecessarily complicating things). Using the variables lets the instructions be easier and more simplistic, while being accurate on varying implementations.

So, these these variables should be set before following the directions that use these variables. If either of the environment variables are unset, then the recommendation is to set them, using the following guidelines. (The alternative would be to adjust other portions of the instructions as appropriate, such as modifying the example command lines more.)

Find the location of the database file paths that will be used by the configuration. The aide man page suggests the databases are in “/etc/”, but in an OpenBSD package this had been seen to default to “/var/db/”. To find this out, run something like the following, making sure to appropriately reference the actual file that the CONFIG_FILE is set to:

grep database /etc/aide.conf | grep -v \#

Some example possible output:


To use different database files, either edit the configuration file that generally gets used, or create a new configuration file and specify the alternate configuration file on the command line.

The variables should be set to for the locations of these files. So, go ahead and set environment variables, such as the following examples:

export AIDEDBFL=/var/db
export AIDEOUTF=/var/db

The idea is that these variables are set to the locations of the input file (specified by the database= line) and the output file (specific by the database_out= line), which are both specified in the configuration file that is shown on the CONFIG_FILE line when running the “aide -v ” command.

(A process could be created to extract the directory names from the text file, perhaps using commands like cut. Using “ grep -v ^# ” would also be recommended. However, the resulting command line is more complex than what is desired for this part of the guide, so these manual steps were made.)

(This documentation came from File Integrity Checking: Check/set variables )