<?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: wtmps access in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/wtmps-access/m-p/3583064#M103706</link>
    <description>Hi Pradeep,&lt;BR /&gt;&lt;BR /&gt;The system auditing requires to be carried out periodically &amp;amp; these logs should be cleared out alongwith that. Otherwise also viewing a information older than few months did not achive much.&lt;BR /&gt;&lt;BR /&gt;If still you require you utilize this information for that than all your entries are visible in the output in descending order sorted by date. So you should be easily able to differentiate in multiple entries of same month in two different years.&lt;BR /&gt;&lt;BR /&gt;HTH,&lt;BR /&gt;Devender&lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Sat, 16 Jul 2005 08:15:27 GMT</pubDate>
    <dc:creator>Devender Khatana</dc:creator>
    <dc:date>2005-07-16T08:15:27Z</dc:date>
    <item>
      <title>wtmps access</title>
      <link>https://community.hpe.com/t5/operating-system-linux/wtmps-access/m-p/3583061#M103703</link>
      <description>How can I access /var/adm/wtmps programatically ? I have tried the structure in utmps.h and also getutsent() functions, but no valid entries are reported. &lt;BR /&gt;&lt;BR /&gt;Is there any other way to get the same output as the "last" command but with the "YEAR" information in the date field ? &lt;BR /&gt;&lt;BR /&gt;Any help will be appreciated.</description>
      <pubDate>Thu, 14 Jul 2005 17:49:56 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/wtmps-access/m-p/3583061#M103703</guid>
      <dc:creator>Pradeep Singh</dc:creator>
      <dc:date>2005-07-14T17:49:56Z</dc:date>
    </item>
    <item>
      <title>Re: wtmps access</title>
      <link>https://community.hpe.com/t5/operating-system-linux/wtmps-access/m-p/3583062#M103704</link>
      <description>&lt;BR /&gt;Do you mean /var/adm/wtmp or /var/adm/wtmpx?  I don't seem to see any /var/adm/wtmps file.&lt;BR /&gt;&lt;BR /&gt;Please clarify.&lt;BR /&gt;&lt;BR /&gt;Thanks...&lt;BR /&gt;&lt;BR /&gt;-- Tom&lt;BR /&gt;</description>
      <pubDate>Fri, 15 Jul 2005 07:37:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/wtmps-access/m-p/3583062#M103704</guid>
      <dc:creator>Tom Schroll</dc:creator>
      <dc:date>2005-07-15T07:37:50Z</dc:date>
    </item>
    <item>
      <title>Re: wtmps access</title>
      <link>https://community.hpe.com/t5/operating-system-linux/wtmps-access/m-p/3583063#M103705</link>
      <description>The year information is NOT stored in the wtmp or btmp files.&lt;BR /&gt;&lt;BR /&gt;You should periodically clear out the files so you KNOW exactly when someone logged in.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 15 Jul 2005 07:54:47 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/wtmps-access/m-p/3583063#M103705</guid>
      <dc:creator>Patrick Wallek</dc:creator>
      <dc:date>2005-07-15T07:54:47Z</dc:date>
    </item>
    <item>
      <title>Re: wtmps access</title>
      <link>https://community.hpe.com/t5/operating-system-linux/wtmps-access/m-p/3583064#M103706</link>
      <description>Hi Pradeep,&lt;BR /&gt;&lt;BR /&gt;The system auditing requires to be carried out periodically &amp;amp; these logs should be cleared out alongwith that. Otherwise also viewing a information older than few months did not achive much.&lt;BR /&gt;&lt;BR /&gt;If still you require you utilize this information for that than all your entries are visible in the output in descending order sorted by date. So you should be easily able to differentiate in multiple entries of same month in two different years.&lt;BR /&gt;&lt;BR /&gt;HTH,&lt;BR /&gt;Devender&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Sat, 16 Jul 2005 08:15:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/wtmps-access/m-p/3583064#M103706</guid>
      <dc:creator>Devender Khatana</dc:creator>
      <dc:date>2005-07-16T08:15:27Z</dc:date>
    </item>
    <item>
      <title>Re: wtmps access</title>
      <link>https://community.hpe.com/t5/operating-system-linux/wtmps-access/m-p/3583065#M103707</link>
      <description>wtmps is used on 11.23 so I assume that you are running that version of hp-ux. /usr/sbin/acct/fwtmp will show you year and number of seconds since epoch so you can try it. -X option is required to read wtmps style records.&lt;BR /&gt;&lt;BR /&gt;$ /usr/sbin/acct/fwtmp -X &amp;lt; /var/adm/wtmps&lt;BR /&gt;              system boot      0  2 0000 0000 1115882951 0 May 12 07:29:11 2005&lt;BR /&gt;0&lt;BR /&gt;...</description>
      <pubDate>Sun, 17 Jul 2005 22:50:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/wtmps-access/m-p/3583065#M103707</guid>
      <dc:creator>Ermin Borovac</dc:creator>
      <dc:date>2005-07-17T22:50:02Z</dc:date>
    </item>
    <item>
      <title>Re: wtmps access</title>
      <link>https://community.hpe.com/t5/operating-system-linux/wtmps-access/m-p/3583066#M103708</link>
      <description>Thanks everyone for responding. &lt;BR /&gt;&lt;BR /&gt;It seems that /var/adm/wtmp and wtmpx will be obsolete in future releases of HPUX. The new file is /var/adm/wtmps. I can get the last login information using /usr/sbin/acct/fwtmp as suggested by Ermin. Iam curious as to which data structure is used to store entries in this file. I have a small C program which takes out the last entry ( on Solaris and AIX ) and sends it to server for reporting and it would be easy to just use the new data structure. &lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 18 Jul 2005 10:24:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/wtmps-access/m-p/3583066#M103708</guid>
      <dc:creator>Pradeep Singh</dc:creator>
      <dc:date>2005-07-18T10:24:48Z</dc:date>
    </item>
    <item>
      <title>Re: wtmps access</title>
      <link>https://community.hpe.com/t5/operating-system-linux/wtmps-access/m-p/3583067#M103709</link>
      <description>I believe that getuts(3C) routines are for accessing utmps. If you'd like to read wtmps you can use bwtmps(3C) functions. man 3C bwtmps for more information.&lt;BR /&gt;&lt;BR /&gt;Here is a sample C program that should work.&lt;BR /&gt;&lt;BR /&gt;#include &lt;STDIO.H&gt;&lt;BR /&gt;#include &lt;UTMPS.H&gt;&lt;BR /&gt;&lt;BR /&gt;int main()&lt;BR /&gt;{&lt;BR /&gt;        struct utmps *wtmps;&lt;BR /&gt;&lt;BR /&gt;        bwtmpname(WTMPS_FILE);&lt;BR /&gt;&lt;BR /&gt;        while ((wtmps = getbwent(sizeof(struct utmps))) != NULL) {&lt;BR /&gt;                printf("%-8.8s %-12.12s %5ld %2hd %lu %s\n",&lt;BR /&gt;                        wtmps-&amp;gt;ut_user,&lt;BR /&gt;                        wtmps-&amp;gt;ut_line,&lt;BR /&gt;                        wtmps-&amp;gt;ut_pid,&lt;BR /&gt;                        wtmps-&amp;gt;ut_type,&lt;BR /&gt;                        wtmps-&amp;gt;ut_tv.tv_sec,&lt;BR /&gt;                        wtmps-&amp;gt;ut_host&lt;BR /&gt;                        );&lt;BR /&gt;        }&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;&lt;/UTMPS.H&gt;&lt;/STDIO.H&gt;</description>
      <pubDate>Mon, 18 Jul 2005 19:17:56 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/wtmps-access/m-p/3583067#M103709</guid>
      <dc:creator>Ermin Borovac</dc:creator>
      <dc:date>2005-07-18T19:17:56Z</dc:date>
    </item>
    <item>
      <title>Re: wtmps access</title>
      <link>https://community.hpe.com/t5/operating-system-linux/wtmps-access/m-p/3583068#M103710</link>
      <description>Right on the button Ermin. This is exactly what I wanted. Thanks a Lot.  &lt;BR /&gt;</description>
      <pubDate>Tue, 19 Jul 2005 10:29:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/wtmps-access/m-p/3583068#M103710</guid>
      <dc:creator>Pradeep Singh</dc:creator>
      <dc:date>2005-07-19T10:29:45Z</dc:date>
    </item>
  </channel>
</rss>

