<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Help On Trusted Computing Base Audit Files in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/help-on-trusted-computing-base-audit-files/m-p/4326546#M341391</link>
    <description>Why bring it back to primary? Normally you save and empty the primary and let it be used again later on.&lt;BR /&gt;&lt;BR /&gt;Using primary and secondary is NOT a good idea. They are rotating logs so the correct terminology is "current" and "next". The trick is to identify which of the two files is current and which is next. &lt;BR /&gt; &lt;BR /&gt;From the audsys man page: "when the current file grows ... the auditing system switches to the next file by setting the current to to next and setting next to null"&lt;BR /&gt;&lt;BR /&gt;You have to use the audsys command to determine if a log file switch has occured from the primary to the secondary. Examine the exit code of the audsys command. If a log switch has occured, the exit code is zero. &lt;BR /&gt;&lt;BR /&gt;if a switch has occured then use audsys again to determine which of the two files is the current one. &lt;BR /&gt;&lt;BR /&gt;Then make a copy of the OTHER file if you want to save a copy of it and designate it as the new next file with its size using the audsys with the -x and -z options</description>
    <pubDate>Fri, 19 Dec 2008 14:44:40 GMT</pubDate>
    <dc:creator>TTr</dc:creator>
    <dc:date>2008-12-19T14:44:40Z</dc:date>
    <item>
      <title>Help On Trusted Computing Base Audit Files</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/help-on-trusted-computing-base-audit-files/m-p/4326545#M341390</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;I had a requirement to enable auditing only on root account. The system was already trusted. I performed the following steps.&lt;BR /&gt;&lt;BR /&gt;mkdir -p /var/.secure/etc/ /var/adm/crash/.secure/etc/&lt;BR /&gt;chown root:root /var/adm/crash/.secure/etc/ /var/.secure/etc/&lt;BR /&gt;chmod 700 /var/adm/crash/.secure/etc/ /var/.secure/etc/&lt;BR /&gt;&lt;BR /&gt;Updated /etc/rc.config.d/auditing file with the following lines&lt;BR /&gt;&lt;BR /&gt;AUDITING=1&lt;BR /&gt;PRI_AUDFILE=/var/.secure/etc/audfile1&lt;BR /&gt;PRI_SWITCH=5000&lt;BR /&gt;SEC_AUDFILE=/var/adm/crash/.secure/etc/audfile2&lt;BR /&gt;SEC_SWITCH=5000&lt;BR /&gt;AUDEVENT_ARGS1=" -P -F   -e moddac -e login -e admin"&lt;BR /&gt;AUDEVENT_ARGS2=""&lt;BR /&gt;AUDEVENT_ARGS3=""&lt;BR /&gt;AUDEVENT_ARGS4=""&lt;BR /&gt;AUDOMON_ARGS=" -p 20 -t 1 -w 90"&lt;BR /&gt;&lt;BR /&gt;Start the auditing&lt;BR /&gt;/sbin/init.d/auditing start&lt;BR /&gt;&lt;BR /&gt;Disabled auditing of all users and enable auditing for root account&lt;BR /&gt;&lt;BR /&gt;/usr/sbin/audusr -D&lt;BR /&gt;/usr/sbin/audusr -a root&lt;BR /&gt;&lt;BR /&gt;Now the question is, How can I maintain the following audit log files,&lt;BR /&gt;&lt;BR /&gt;/var/.secure/etc/audfile1&lt;BR /&gt;/var/adm/crash/.secure/etc/audfile2&lt;BR /&gt;&lt;BR /&gt;Once the switch happens from Primary to secondary, how can I bring it back to primary.&lt;BR /&gt;&lt;BR /&gt;Could you please provide me a script, so that I can put it in root cron.&lt;BR /&gt;&lt;BR /&gt;Thank You.&lt;BR /&gt;&lt;BR /&gt;Ravi.</description>
      <pubDate>Fri, 19 Dec 2008 12:01:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/help-on-trusted-computing-base-audit-files/m-p/4326545#M341390</guid>
      <dc:creator>G V R Shankar</dc:creator>
      <dc:date>2008-12-19T12:01:33Z</dc:date>
    </item>
    <item>
      <title>Re: Help On Trusted Computing Base Audit Files</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/help-on-trusted-computing-base-audit-files/m-p/4326546#M341391</link>
      <description>Why bring it back to primary? Normally you save and empty the primary and let it be used again later on.&lt;BR /&gt;&lt;BR /&gt;Using primary and secondary is NOT a good idea. They are rotating logs so the correct terminology is "current" and "next". The trick is to identify which of the two files is current and which is next. &lt;BR /&gt; &lt;BR /&gt;From the audsys man page: "when the current file grows ... the auditing system switches to the next file by setting the current to to next and setting next to null"&lt;BR /&gt;&lt;BR /&gt;You have to use the audsys command to determine if a log file switch has occured from the primary to the secondary. Examine the exit code of the audsys command. If a log switch has occured, the exit code is zero. &lt;BR /&gt;&lt;BR /&gt;if a switch has occured then use audsys again to determine which of the two files is the current one. &lt;BR /&gt;&lt;BR /&gt;Then make a copy of the OTHER file if you want to save a copy of it and designate it as the new next file with its size using the audsys with the -x and -z options</description>
      <pubDate>Fri, 19 Dec 2008 14:44:40 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/help-on-trusted-computing-base-audit-files/m-p/4326546#M341391</guid>
      <dc:creator>TTr</dc:creator>
      <dc:date>2008-12-19T14:44:40Z</dc:date>
    </item>
    <item>
      <title>Re: Help On Trusted Computing Base Audit Files</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/help-on-trusted-computing-base-audit-files/m-p/4326547#M341392</link>
      <description>I don't use auditing anymore but I just found the script I was using. I can not post it because I was using "audfile1" and "audfile2" for the log files and my logic to determine the switching was based on the numbers "1" and "2" at the end of the file names.&lt;BR /&gt;&lt;BR /&gt;But the logic is as fiollows:&lt;BR /&gt;&lt;BR /&gt;1. audsys | grep next | grep none&lt;BR /&gt;2. switch=$?&lt;BR /&gt;(Run audsys and check if the "next" log file is set to "none". This means that a log switch has occured from one file to the other. Auditing now has no "next" file. If the "current" file fills up, auditing will stop)&lt;BR /&gt;3. if [ "$switch" = 0 ] then&lt;BR /&gt;&lt;BR /&gt;3a. current=$(audsys | grep "current file" | head -1 ****&lt;BR /&gt;(you may need to use "cut" where the **** are. My filenames and paths were different so I had to cut based on that. As I said i don't run it anymore so I don't know what the output of audsys looks like)&lt;BR /&gt;3b. if current=PRI_AUDFILE then next=SEC_AUDFILE else next=PRI_AUFILE&lt;BR /&gt;3c. cp $nextfile /some/path/audfile.`date "+%H%M-%d%b%y"`&lt;BR /&gt;(make a copy of the next file with a time stamp)&lt;BR /&gt;3d. &amp;gt; $nextfile&lt;BR /&gt;(empty the next file)&lt;BR /&gt;3e. audsys -x $nextfile -z 5000&lt;BR /&gt;(change the "next" file from null to the unused file)&lt;BR /&gt;&lt;BR /&gt;You need to schedule this in cron based on the size of the log files and activity on the server.</description>
      <pubDate>Fri, 19 Dec 2008 15:09:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/help-on-trusted-computing-base-audit-files/m-p/4326547#M341392</guid>
      <dc:creator>TTr</dc:creator>
      <dc:date>2008-12-19T15:09:16Z</dc:date>
    </item>
    <item>
      <title>Re: Help On Trusted Computing Base Audit Files</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/help-on-trusted-computing-base-audit-files/m-p/4326548#M341393</link>
      <description>Line 3b should have "nextfile" instead of "next" in both places.</description>
      <pubDate>Fri, 19 Dec 2008 15:19:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/help-on-trusted-computing-base-audit-files/m-p/4326548#M341393</guid>
      <dc:creator>TTr</dc:creator>
      <dc:date>2008-12-19T15:19:10Z</dc:date>
    </item>
    <item>
      <title>Re: Help On Trusted Computing Base Audit Files</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/help-on-trusted-computing-base-audit-files/m-p/4326549#M341394</link>
      <description>Hi TTr,&lt;BR /&gt;&lt;BR /&gt;Thank You very much for the Logic. I could make a script of it.&lt;BR /&gt;&lt;BR /&gt;Following is the audsys o/p.&lt;BR /&gt;&lt;BR /&gt;#audsys&lt;BR /&gt;auditing system is currently on&lt;BR /&gt;current file: /audit1/audfile1&lt;BR /&gt;next    file: none&lt;BR /&gt;statistics-     afs Kb  used Kb  avail %    fs Kb  used Kb  avail %&lt;BR /&gt;current file:     5000   854876   -16997  5242880   873823       83&lt;BR /&gt;next    file: none&lt;BR /&gt;&lt;BR /&gt;I have run the following command&lt;BR /&gt;#audsys -x /audit2/audfile2 -z 5000&lt;BR /&gt;&lt;BR /&gt;Following is the audsys o/p.&lt;BR /&gt;&lt;BR /&gt;#audsys&lt;BR /&gt;auditing system is currently on&lt;BR /&gt;current file: /audit2/audfile2&lt;BR /&gt;next    file: none&lt;BR /&gt;statistics-     afs Kb  used Kb  avail %    fs Kb  used Kb  avail %&lt;BR /&gt;current file:     5000       32       99  5242880    18455      100&lt;BR /&gt;next    file: none&lt;BR /&gt;&lt;BR /&gt;The "next file" is still set to none and the "current file" got changed to /audit2/audfile2&lt;BR /&gt;&lt;BR /&gt;I was in a impression, that when we run the following command&lt;BR /&gt;&lt;BR /&gt;audsys -x /audit2/audfile2 -z 5000&lt;BR /&gt;&lt;BR /&gt;It will actually set the "next file", not the "current file"&lt;BR /&gt;&lt;BR /&gt;Correct me if I am wrong.&lt;BR /&gt;&lt;BR /&gt;Ravi.</description>
      <pubDate>Sun, 21 Dec 2008 09:38:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/help-on-trusted-computing-base-audit-files/m-p/4326549#M341394</guid>
      <dc:creator>G V R Shankar</dc:creator>
      <dc:date>2008-12-21T09:38:14Z</dc:date>
    </item>
    <item>
      <title>Re: Help On Trusted Computing Base Audit Files</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/help-on-trusted-computing-base-audit-files/m-p/4326550#M341395</link>
      <description>Did you empty (null out) the "next" file before running the "audsys -x ..." command?&lt;BR /&gt;See the man page. When setting the next file with the "-x" option the specified file must be empty or nonexistent.</description>
      <pubDate>Sun, 21 Dec 2008 18:22:56 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/help-on-trusted-computing-base-audit-files/m-p/4326550#M341395</guid>
      <dc:creator>TTr</dc:creator>
      <dc:date>2008-12-21T18:22:56Z</dc:date>
    </item>
    <item>
      <title>Re: Help On Trusted Computing Base Audit Files</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/help-on-trusted-computing-base-audit-files/m-p/4326551#M341396</link>
      <description>Hi TTr,&lt;BR /&gt;&lt;BR /&gt;I have nullified the file /audit1/audfile1. If not, the system would fire an eror message, stating that the file is not empty.&lt;BR /&gt;&lt;BR /&gt;Cheers,&lt;BR /&gt;&lt;BR /&gt;Ravi.</description>
      <pubDate>Tue, 23 Dec 2008 02:41:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/help-on-trusted-computing-base-audit-files/m-p/4326551#M341396</guid>
      <dc:creator>G V R Shankar</dc:creator>
      <dc:date>2008-12-23T02:41:22Z</dc:date>
    </item>
    <item>
      <title>Re: Help On Trusted Computing Base Audit Files</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/help-on-trusted-computing-base-audit-files/m-p/4326552#M341397</link>
      <description>As I said before I no longer run auditing and can not test what you are saying.  I only ran auditing for a little bit and created a script to switch the log files.&lt;BR /&gt;I looked for patches for the audsys command but did not find any. &lt;BR /&gt;Verify that the correct files are assigned to the "current" and "next" file handles.  Verify that your logic detects if a log switch has ocurred correctly.&lt;BR /&gt;Try switching the files manually to see if "next" is set correctly from "none" to the right file.&lt;BR /&gt;Add echo statements in your script to verify the correct values are assigned to the variables.</description>
      <pubDate>Tue, 23 Dec 2008 16:02:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/help-on-trusted-computing-base-audit-files/m-p/4326552#M341397</guid>
      <dc:creator>TTr</dc:creator>
      <dc:date>2008-12-23T16:02:36Z</dc:date>
    </item>
  </channel>
</rss>

