How to install auditd from source in Ubuntu?
Solution 1
First
sudo apt-get install build-essential
sudo apt-get source apt-get source
sudo apt-get build-dep audit
cd audit-2.3.2
Then: fix 'debian/rules' file. You need to remove '–disable-listener' option.
Finally:
sudo dpkg-buildpackage -b
cd ../
sudo dpkg -i auditd_2.3.2-2ubuntu1_amd64.deb
And if you need plugins:
sudo dpkg -i audispd-plugins_2.3.2-2ubuntu1_amd64.deb
Solution 2
In general: packages.ubuntu.com contains a home page for each package.
That home page has a number of interesting sections, including in the right column a number of links, one of which is to the home page of the original open source project but you can also download both the original source and the modified Debian/Ubuntu sources that were used to build the original package.
This answer has a nice description of how to modify an existing Debian/Ubuntu (source) package, which might be more maintainable than just downloading the source.
Related videos on Youtube
Valeria
Updated on September 18, 2022Comments
-
Valeria over 1 year
I want to set up auditd to collect its logs from remote server.
I'm using Ubuntu 14.04.3 LTS.
This feature seems to be disabled into Ubuntu auditd package.
So, I'm going to install it from source.
Where do I can download right auditd source code? Are there any issues with installing auditd from source?
Update: I tried to download audit_2.3.2.orig.tar.gz from package page and from project page (on https://people.redhat.com/sgrubb/audit), but when I run
.configure
get an errorCould not find libwrap headers
-
Valeria about 8 yearsThanks! I tried to download audit_2.3.2.orig.tar.gz from package page and from project page, but when run .configure got an error 'Could not find libwrap headers'. How to use audit_2.3.2-2ubuntu1.dsc file? Now, reading and trying 'rebuilding package' manual.
-
HBruijn about 8 yearsYou need set up a correct development environment, the topic of which is much more suitable for StackOverflow, with the development files/packages containing the headers (for all dependancies) such as for instance
libwrap0-dev
-
Valeria about 8 yearsThank you, @hbruijn! 'apt-get install libwrap0-dev libcap-ng-dev swig' solved installing problems. Also, I tried to rebuild package (with fixed 'debian/rules' file). It's not too complex as it seems. Now I have installed and working auditd.