<?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: last command / wtmp file in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/last-command-wtmp-file/m-p/3146209#M156505</link>
    <description>John&lt;BR /&gt;&lt;BR /&gt;Further to what has already been said get your sql programmer to sort out his script and do an elegant logout.&lt;BR /&gt;&lt;BR /&gt;Paula</description>
    <pubDate>Tue, 16 Dec 2003 15:39:42 GMT</pubDate>
    <dc:creator>Paula J Frazer-Campbell</dc:creator>
    <dc:date>2003-12-16T15:39:42Z</dc:date>
    <item>
      <title>last command / wtmp file</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/last-command-wtmp-file/m-p/3146206#M156502</link>
      <description>This is a 4 part question.  A SQL programmer who has access to my HP UX/11i system is currently using "rexec" via NFS to update data on the SQL servers.  As of a couple of weeks ago thi proccess runs every 2 mintues.  I would like to do some house cleaning, so I wanted to see what users had not logged in for several months and delete them the problem is I have pages of&lt;BR /&gt;i1317    rexecd       Tue Dec 16 11:00   still logged in&lt;BR /&gt;i1317    rexecd       Tue Dec 16 11:00   still logged in&lt;BR /&gt;i1317    rexecd       Tue Dec 16 10:58   still logged in&lt;BR /&gt;i1317    rexecd       Tue Dec 16 10:58   still logged in&lt;BR /&gt;i1317    rexecd       Tue Dec 16 10:58   still logged in&lt;BR /&gt;i1317    rexecd       Tue Dec 16 10:58   still logged in&lt;BR /&gt;&lt;BR /&gt;1) Even though the NT servers show that these commands were completed, I show them still logged in.  Will this cause problems?&lt;BR /&gt;2) Is there any way of purging this file and keeping only 3 months.&lt;BR /&gt;3) Is there any way of purging the user i1317 out of this file? &lt;BR /&gt;4) Is there a way to extract only the last login of every user, instead of extracting every login of every user?&lt;BR /&gt;</description>
      <pubDate>Tue, 16 Dec 2003 14:09:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/last-command-wtmp-file/m-p/3146206#M156502</guid>
      <dc:creator>John Jimenez</dc:creator>
      <dc:date>2003-12-16T14:09:13Z</dc:date>
    </item>
    <item>
      <title>Re: last command / wtmp file</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/last-command-wtmp-file/m-p/3146207#M156503</link>
      <description>1. It may happen that, user does a abrupt close from nnt, the server will still have that session open. IF there is no graceful logout, it may result inot this problem. It may also corrupt wtmp file and last will also give problems.&lt;BR /&gt;&lt;BR /&gt;2. The file /var/adm/wtmp, /var/adm/btmp should be purged  periodically. You can SAM for this. These files can be nulled out as follows.&lt;BR /&gt;cp /dev/null /var/adm/wtmp&lt;BR /&gt;cp /dev/null /var/adm/btmp&lt;BR /&gt;&lt;BR /&gt;3.Purge user i1317 out of wtmp&lt;BR /&gt;last|grep -v i1317.&lt;BR /&gt;OR&lt;BR /&gt;check man page of fwtmp. With this you can create a text file from wtmp, view/modify it and again convert it to wtmp again.&lt;BR /&gt;&lt;BR /&gt;4.last|grep "user_name"|head -1&lt;BR /&gt;and similar command combinations to view what you want.&lt;BR /&gt;</description>
      <pubDate>Tue, 16 Dec 2003 14:17:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/last-command-wtmp-file/m-p/3146207#M156503</guid>
      <dc:creator>RAC_1</dc:creator>
      <dc:date>2003-12-16T14:17:30Z</dc:date>
    </item>
    <item>
      <title>Re: last command / wtmp file</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/last-command-wtmp-file/m-p/3146208#M156504</link>
      <description>The cleaning part can be done at reboot time, as long as you have PHCO_24829 loaded and the special instructions loaded. We have a similar problem with some users not logging out properly and this is how it can be managed. There is no way to purge specific records, but there is a way of excluding them if you know who they are in your reporting script. In your script you could supply a list of each user from the password file and filter out each duplicate entry.</description>
      <pubDate>Tue, 16 Dec 2003 14:22:51 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/last-command-wtmp-file/m-p/3146208#M156504</guid>
      <dc:creator>Michael Tully</dc:creator>
      <dc:date>2003-12-16T14:22:51Z</dc:date>
    </item>
    <item>
      <title>Re: last command / wtmp file</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/last-command-wtmp-file/m-p/3146209#M156505</link>
      <description>John&lt;BR /&gt;&lt;BR /&gt;Further to what has already been said get your sql programmer to sort out his script and do an elegant logout.&lt;BR /&gt;&lt;BR /&gt;Paula</description>
      <pubDate>Tue, 16 Dec 2003 15:39:42 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/last-command-wtmp-file/m-p/3146209#M156505</guid>
      <dc:creator>Paula J Frazer-Campbell</dc:creator>
      <dc:date>2003-12-16T15:39:42Z</dc:date>
    </item>
    <item>
      <title>Re: last command / wtmp file</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/last-command-wtmp-file/m-p/3146210#M156506</link>
      <description>Hi,&lt;BR /&gt;to add a little to question no. 3: you can  edit the wtmp file by extracting an ascii version of it and perform the editing in that version. After editing, the modified ascii version can be read in as current wtmp file. An example, execute as root:&lt;BR /&gt;&lt;BR /&gt;# /usr/sbin/acct/fwtmp &amp;lt; /etc/wtmp &amp;gt; /tmp/wtmp.txt&lt;BR /&gt;&lt;BR /&gt;which retrieves an ascii version of /etc/wtmp to /tmp/wtmp.txt&lt;BR /&gt;Modify this file with your favourite vi-editor. When finished, read in the modified /tmp/wtmp.txt as current i/etc/wtmp file:&lt;BR /&gt;&lt;BR /&gt;# /usr/sbin/acct/fwtmp -ic &amp;lt; /tmp/wtmp.txt &amp;gt; /etc/wtmp &lt;BR /&gt; &lt;BR /&gt;regards,&lt;BR /&gt;John K.&lt;BR /&gt;</description>
      <pubDate>Tue, 16 Dec 2003 15:48:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/last-command-wtmp-file/m-p/3146210#M156506</guid>
      <dc:creator>john korterman</dc:creator>
      <dc:date>2003-12-16T15:48:33Z</dc:date>
    </item>
  </channel>
</rss>

