<?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 Login Information in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/last-login-information/m-p/2424522#M747</link>
    <description>My previous answer should be all on one line or have a continuation character.&lt;BR /&gt;Try the following. It gets a list of all the ids in /etc/passwd, then checks each one with the "last" command and takes only one answer from the "last" command for each passwd entry. &lt;BR /&gt;&lt;BR /&gt;awk -F: '{print "last | grep " $1 " | head -1"}' /etc/passwd | ksh -</description>
    <pubDate>Mon, 05 Jun 2000 16:58:58 GMT</pubDate>
    <dc:creator>Duane Gorder</dc:creator>
    <dc:date>2000-06-05T16:58:58Z</dc:date>
    <item>
      <title>Last Login Information</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/last-login-information/m-p/2424517#M742</link>
      <description>I am attempting to create a report of the last logins (successful) for all of the users on our servers.  Using the "last" command I just keep getting a lengthy list of all successfull logins in the audit files. How can I limit the returned data to just the most recent successful login?</description>
      <pubDate>Thu, 01 Jun 2000 14:51:17 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/last-login-information/m-p/2424517#M742</guid>
      <dc:creator>Scott E Smith</dc:creator>
      <dc:date>2000-06-01T14:51:17Z</dc:date>
    </item>
    <item>
      <title>Re: Last Login Information</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/last-login-information/m-p/2424518#M743</link>
      <description>I guess you could grep for particular date or dates.&lt;BR /&gt;&lt;BR /&gt;other thing to do is roll the log file over once a week (or however often you consider recent logins to be)&lt;BR /&gt;&lt;BR /&gt;/var/adm/wtmp</description>
      <pubDate>Thu, 01 Jun 2000 14:58:03 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/last-login-information/m-p/2424518#M743</guid>
      <dc:creator>Andrew Lartey</dc:creator>
      <dc:date>2000-06-01T14:58:03Z</dc:date>
    </item>
    <item>
      <title>Re: Last Login Information</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/last-login-information/m-p/2424519#M744</link>
      <description>Try last -R -count were count could be any number.&lt;BR /&gt;&lt;BR /&gt;eg last -R -50&lt;BR /&gt;&lt;BR /&gt;Cheers&lt;BR /&gt;</description>
      <pubDate>Thu, 01 Jun 2000 15:24:57 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/last-login-information/m-p/2424519#M744</guid>
      <dc:creator>CHRIS_ANORUO</dc:creator>
      <dc:date>2000-06-01T15:24:57Z</dc:date>
    </item>
    <item>
      <title>Re: Last Login Information</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/last-login-information/m-p/2424520#M745</link>
      <description>How about:&lt;BR /&gt;&lt;BR /&gt;#! /usr/bin/ksh&lt;BR /&gt;cat /etc/passwd | sed 's/:.*//' | while read user ; do&lt;BR /&gt;last $user | sed 1q&lt;BR /&gt;done | grep -v "wtmp begins" | ssp&lt;BR /&gt;exit 0&lt;BR /&gt;&lt;BR /&gt;If you're using nis, "cat /etc/passwd" becomes "ypcat passwd".</description>
      <pubDate>Thu, 01 Jun 2000 18:57:37 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/last-login-information/m-p/2424520#M745</guid>
      <dc:creator>Paul Hite</dc:creator>
      <dc:date>2000-06-01T18:57:37Z</dc:date>
    </item>
    <item>
      <title>Re: Last Login Information</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/last-login-information/m-p/2424521#M746</link>
      <description>Try the following. It gets a list of all the ids in /etc/passwd, then checks each one with the "last" command and takes only one answer from the "last" command for each passwd entry. &lt;BR /&gt;&lt;BR /&gt;awk -F: '{print "last | grep " $1 &lt;BR /&gt;    " | head -1"}' /etc/passwd | ksh -</description>
      <pubDate>Mon, 05 Jun 2000 16:52:19 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/last-login-information/m-p/2424521#M746</guid>
      <dc:creator>Duane Gorder</dc:creator>
      <dc:date>2000-06-05T16:52:19Z</dc:date>
    </item>
    <item>
      <title>Re: Last Login Information</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/last-login-information/m-p/2424522#M747</link>
      <description>My previous answer should be all on one line or have a continuation character.&lt;BR /&gt;Try the following. It gets a list of all the ids in /etc/passwd, then checks each one with the "last" command and takes only one answer from the "last" command for each passwd entry. &lt;BR /&gt;&lt;BR /&gt;awk -F: '{print "last | grep " $1 " | head -1"}' /etc/passwd | ksh -</description>
      <pubDate>Mon, 05 Jun 2000 16:58:58 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/last-login-information/m-p/2424522#M747</guid>
      <dc:creator>Duane Gorder</dc:creator>
      <dc:date>2000-06-05T16:58:58Z</dc:date>
    </item>
  </channel>
</rss>

