System Administration
cancel
Showing results for 
Search instead for 
Did you mean: 

/.secure/etc/audfile1 size restriction

silusanis
Occasional Contributor

/.secure/etc/audfile1 size restriction

Hi
Recently we installed a s/w ServerSensor70_HP-UX_SR4_1.depot and wanted to start auditing.

cat /etc/rc.config.d/auditing

---

---

---



AUDITING=1

PRI_AUDFILE=/.secure/etc/audfile1

PRI_SWITCH=1000

SEC_AUDFILE=/.secure/etc/audfile2

SEC_SWITCH=1000

AUDEVENT_ARGS1="-P -F -e moddac -e login -e admin"

AUDEVENT_ARGS2=""

AUDEVENT_ARGS3=""

AUDEVENT_ARGS4=""

AUDOMON_ARGS="-p 20 -t 1 -w 90"
#
#
# cd /.secure/etc

#

# ll

total 22320

-rw------- 1 root root 3462844 Aug 13 11:25 audfile1 (see this file size!!)

-rw------- 1 root sys 5134197 Jul 20 15:22 audfile2 (see this file size!!)

-rw------- 1 root root 31 Aug 9 17:10 audnames

#

# cat audnames

/.secure/etc/audfile1,1000

*,0

#

Console is full of these errors/messages

current audit file size is 3384 kilobytes!!!

an attempt to switch to the backup file failed.

Must specify a backup file now !


I thought in audnames file this line

/.secure/etc/audfile1,1000

restricts the size of audfile1 to 1000kb.

But it is not restricting!

Also, I just now added a line(audfile2) in audnames file. This is just fyi

# cat audnames
/.secure/etc/audfile1,1000
/.secure/etc/audfile2,1000
*,0
#



My main intention is to restrict the file size of audfile* to a particular size...say 1 MB

In the other threads, I saw suggestions to do this via SAM, but I couldn't do this as I cannot see any such options in SAM/SMH

# uname -a
HP-UX B.11.23 U ia64 0263711056 unlimited-user license
#

Can somebody help me in acheiving this..thanks

3 REPLIES
Bill Hassell
Honored Contributor

Re: /.secure/etc/audfile1 size restriction

>
PRI_AUDFILE=/.secure/etc/audfile1

/.secure is a very, very bad place for auditing logs. Yes, know it's the default but you never put logs, expecially massively large logs from auditing into the / directory.

> /.secure/etc/audfile1,1000

1 MB is way, way too small for an audit log. Auditing limits can be very carefully adjusted so they do not grow to gigabytes in size, but I would start your logs in a big directory like /var and create a .secure directory there. Then increase the log sizes to 10-20 MB and restart auditing. Now monitor the size of the logs. Once you are comfortable with the growth, you can adjust the size. Note that you only have two logs. If one fills the previous log is erased and a new log is started. Ideally, the maximum log size should last for several days and that may mean your logs must be 100-300 MB.


Bill Hassell, sysadmin
silusanis
Occasional Contributor

Re: /.secure/etc/audfile1 size restriction

Hello Bill
Sorry for late response.
Okay, I will try to create .secure/etc/audfile1 in /var

And I think I need to mention the new path in /.secure/etc/audnames

Let us say I want to change the max size of audfile1 to 300MB, then do I need to mention that in audnames? or somewhere else?

Now, my main intention is to restrict the audfile1 & audfile2 to 300MB

then would it be like this?

# cat audnames
/.secure/etc/audfile1,300000
/.secure/etc/audfile2,300000
*,0
#

I think I also need to do something to audit only the newly installed software and turn off auditing of other softwares..


silusanis
Occasional Contributor

Re: /.secure/etc/audfile1 size restriction

audfile sizes should be high
both the file names should be mentioned in audnames file