Hi Sylvain,
I suppose you configured AIX auditing in binary mode on your system. If it is so, you have the configuration file in /etc/security/audit/config. In the file you can find the section bin:
bin: bincompact = off trail = /audit/trail bin1 = /audit/bin1 bin2 = /audit/bin2 binsize = 10240 cmds = /etc/security/audit/bincmds freespace = 65536 backuppath = /audit backupsize = 0The section describes the parameter for the binary audit and the command used to create the audit trail:
cmds = /etc/security/audit/bincmdsIn standard AIX installation it is a very simple command:
# cat /etc/security/audit/bincmds/usr/sbin/auditcat -p -o $trail $binYou can try to change the command to suit your needs. E.g. you can limit the size of the trail:
-s sizeSpecifies the limit on size of the trail file, after which backup of trail had to be taken . Sizeshould be specified in units of 512-byte blocks. If size parameter is ve or zero or any invalidvalue, auditcat will ignore flag and value. The maximum possible value is 4194303 (about 2GB offree disk space).Or you can create filenames with the date in it and then delete it using a cron job.
-o OutFileSpecifies the audit trail file to which the auditcat command writes records. If you specify $trailas the file for the OutFile parameter, the auditbin daemon substitutes the name of the systemaudit trail file.I hope it helps.
------------------------------
Andrey Klyachkin
https://www.power-devops.com------------------------------
Original Message:
Sent: Wed August 17, 2022 09:19 AM
From: Sylvain
Subject: Rotate and purge old audit trail
Hello,
anyone can tell me what is the best way to rotate /audit/trail file and purge when they are older than x days ?
Thanks in advance for your help.
------------------------------
Sylvain
------------------------------