<?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: Login Information in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/login-information/m-p/4259788#M332785</link>
    <description>Ummmmmm . . . . . the lastb command reports bad logins - I believe the report needs to be good logins.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Pete</description>
    <pubDate>Thu, 28 Aug 2008 13:26:07 GMT</pubDate>
    <dc:creator>Pete Randall</dc:creator>
    <dc:date>2008-08-28T13:26:07Z</dc:date>
    <item>
      <title>Login Information</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/login-information/m-p/4259785#M332782</link>
      <description>I have recently trimmed my wtmp file just as part of monthly cleanup but I do have the backup of the old file. Now the management needs the record of when was the last time when each user on that system logged in? &lt;BR /&gt;&lt;BR /&gt;How can I use the old wtmp file along with the current one to get this report done?</description>
      <pubDate>Thu, 28 Aug 2008 13:06:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/login-information/m-p/4259785#M332782</guid>
      <dc:creator>Waqar Razi</dc:creator>
      <dc:date>2008-08-28T13:06:39Z</dc:date>
    </item>
    <item>
      <title>Re: Login Information</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/login-information/m-p/4259786#M332783</link>
      <description>The last command will search through the wtmp file.  You can also specify the -f option in order to specify that it search through your backup wtmp file.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Pete</description>
      <pubDate>Thu, 28 Aug 2008 13:12:19 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/login-information/m-p/4259786#M332783</guid>
      <dc:creator>Pete Randall</dc:creator>
      <dc:date>2008-08-28T13:12:19Z</dc:date>
    </item>
    <item>
      <title>Re: Login Information</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/login-information/m-p/4259787#M332784</link>
      <description>Hi Razi,&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;You give following:&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;#lastb -f &lt;PATH to="" old="" file=""&gt;&lt;BR /&gt;&lt;BR /&gt;where:&lt;BR /&gt;&lt;BR /&gt; -f file   Use file as the name of the accounting file instead of /var/adm/wtmp or /var/adm/btmp.&lt;BR /&gt;&lt;BR /&gt;&lt;/PATH&gt;</description>
      <pubDate>Thu, 28 Aug 2008 13:16:57 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/login-information/m-p/4259787#M332784</guid>
      <dc:creator>Deepak Kr</dc:creator>
      <dc:date>2008-08-28T13:16:57Z</dc:date>
    </item>
    <item>
      <title>Re: Login Information</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/login-information/m-p/4259788#M332785</link>
      <description>Ummmmmm . . . . . the lastb command reports bad logins - I believe the report needs to be good logins.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Pete</description>
      <pubDate>Thu, 28 Aug 2008 13:26:07 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/login-information/m-p/4259788#M332785</guid>
      <dc:creator>Pete Randall</dc:creator>
      <dc:date>2008-08-28T13:26:07Z</dc:date>
    </item>
    <item>
      <title>Re: Login Information</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/login-information/m-p/4259789#M332786</link>
      <description>Shalom,&lt;BR /&gt;&lt;BR /&gt;Prior to trimming the file, it might pay to make a backup if management wants records from the distant past.&lt;BR /&gt;&lt;BR /&gt;the lastb command gives non-binary output to /var/adm/btmp and the last command does the same for /var/adm/wtmp&lt;BR /&gt;&lt;BR /&gt;Note that -r option gives the remote IP address, which is standard output in the Linux version of the utility.&lt;BR /&gt;&lt;BR /&gt;passwd -sa might provide good data to cross check against manually&lt;BR /&gt;&lt;BR /&gt;SEP</description>
      <pubDate>Thu, 28 Aug 2008 13:27:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/login-information/m-p/4259789#M332786</guid>
      <dc:creator>Steven E. Protter</dc:creator>
      <dc:date>2008-08-28T13:27:50Z</dc:date>
    </item>
    <item>
      <title>Re: Login Information</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/login-information/m-p/4259790#M332787</link>
      <description>&lt;!--!*#--&gt;HI Wagar:&lt;BR /&gt;&lt;BR /&gt;You could do something like this:&lt;BR /&gt;&lt;BR /&gt;#!/usr/bin/sh&lt;BR /&gt;MYWTMP=/var/adm/wtmp.backup #...change me...&lt;BR /&gt;OLDIFS=${IFS}&lt;BR /&gt;IFS=":"&lt;BR /&gt;while read USER X&lt;BR /&gt;do&lt;BR /&gt;    last -1 ${USER} -f ${MYWTMP}|grep -Ev "^$|^wtmp begins"&lt;BR /&gt;done &amp;lt; /etc/passwd&lt;BR /&gt;IFS=${OLDIFS}&lt;BR /&gt;exit 0&lt;BR /&gt;&lt;BR /&gt;...This will produce one-line output for every user in your '/etc/passwd' with an entry in your 'wtmp' backup.  Only the most recent login information (one line per user) will be printed.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Thu, 28 Aug 2008 13:31:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/login-information/m-p/4259790#M332787</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2008-08-28T13:31:00Z</dc:date>
    </item>
    <item>
      <title>Re: Login Information</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/login-information/m-p/4259791#M332788</link>
      <description>&lt;!--!*#--&gt;&amp;gt;if I have a user steve and he logged in for the last time one week before, output should be like that:&lt;BR /&gt;&lt;BR /&gt;Here is a script something like JRF's script in your other link:&lt;BR /&gt;&lt;A href="http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1263622" target="_blank"&gt;http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1263622&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;The output looks like:&lt;BR /&gt;root 0 0 0 Wed Aug 27 13:13&lt;BR /&gt;&lt;BR /&gt;Note this just checks the current system with last(1).&lt;BR /&gt;&lt;BR /&gt;sort passwd1 passwd2 passwd3 | awk -F: '&lt;BR /&gt;function do_print() {&lt;BR /&gt;   save_line = name " " uid&lt;BR /&gt;   last_command = "last -1 " name&lt;BR /&gt;   name = $1; uid = $3&lt;BR /&gt;   FS=" "&lt;BR /&gt;   xx = last_command | getline&lt;BR /&gt;   if (xx == 1)&lt;BR /&gt;      print save_line, $3, $4, $5, $6&lt;BR /&gt;   else&lt;BR /&gt;      print save_line, "???"&lt;BR /&gt;   FS=":"&lt;BR /&gt;}&lt;BR /&gt;BEGIN { getline; name = $1; uid = $3 }&lt;BR /&gt;{&lt;BR /&gt;if ($1 == name) {&lt;BR /&gt;   uid = uid " " $3&lt;BR /&gt;} else {&lt;BR /&gt;   do_print()&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;END { do_print() } '</description>
      <pubDate>Fri, 29 Aug 2008 01:55:51 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/login-information/m-p/4259791#M332788</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2008-08-29T01:55:51Z</dc:date>
    </item>
  </channel>
</rss>

