Auditing writes to all files in the /etc directory fills up root.

Auditing writes to all files in the /etc directory fills up root.  What can I do to avoid this (aside from mounting /audit as a file system as I don't have enough space available to do this).

“For stream mode, the log file is /audit/stream.out. I strongly suggest the directory /audit is mounted as a file system. It if isn’t you could be in danger of filling up the root file system.”
http://www.ibmsystemsmag.com/aix/enewsletterexclusive/26232p2.aspx.

This is the script I'm using to do the audit:
## Shuts down auditing ##
/usr/sbin/audit shutdown
sleep 5
fuser -k /audit/stream.out
cp /dev/null /etc/security/audit/objects
## Saves audit log to a file named with the current day (days overwritten with new data weekly) ##
mv /audit/stream.out /audit/audit`date +%m%a`.log
## Puts every file in the specified directories into the objects file to be audited ##
find /etc -type f | awk '{printf("%s:\n\tw = FILE_Write\n\n",$1)}' > /etc/security/audit/objects
## Starts auditing ##
/usr/sbin/audit start


murkytunaAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

woolmilkporcCommented:
Hi,
this warning is indeed justified. Streaming to the root filesystem can be dangerous.
The best way is actually creating a separate filesystem  for this.
But don't worry, if you can't afford a new FS you can always edit the file "/etc/security/audit/streamcmds"
to define a new stream destination. This file contains by default this line -
/usr/sbin/auditstream | auditpr > /audit/stream.out & 
Just change /audit/stream.out to a destination of your choice and restart auditing. Take care to change your reporting scripts (if any) to point to the new destination, and also the script you quoted in your question.
Of course you can also create a link, for example (stop auditing first!) -
cd /
tar -cvf /tmp/audit.tar ../audit
cd /var
tar -xvf /tmp/audit.tar
cd /
rm -r audit
ln -sf /var/audit audit  

Replace /var with a destination of your choice, outside the root FS.
wmp
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
murkytunaAuthor Commented:
Fantastic.  Thanks.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Unix OS

From novice to tech pro — start learning today.