<?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: HPUX 10.20: Last User Login in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/hpux-10-20-last-user-login/m-p/2863281#M96743</link>
    <description>I would've said the same as John, check the last date used of their .profile file:&lt;BR /&gt;&lt;BR /&gt;# ls -ltu /home/chuckj/.profile&lt;BR /&gt;&lt;BR /&gt;For future, you could write a script that gets executed via /etc/profile that creates a file with the data you require.&lt;BR /&gt;&lt;BR /&gt;Or, if you want to do it for all users at this polint in time you could write a script that something like:&lt;BR /&gt;&lt;BR /&gt; cd /home&lt;BR /&gt; for user in *.*&lt;BR /&gt; do&lt;BR /&gt;    ls -ltu /home/$user/.profile &amp;gt;&amp;gt; /tmp/lastlogin&lt;BR /&gt; &lt;BR /&gt;etc...&lt;BR /&gt;&lt;BR /&gt;Chuck J</description>
    <pubDate>Thu, 12 Dec 2002 15:52:18 GMT</pubDate>
    <dc:creator>Chuck J</dc:creator>
    <dc:date>2002-12-12T15:52:18Z</dc:date>
    <item>
      <title>HPUX 10.20: Last User Login</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/hpux-10-20-last-user-login/m-p/2863275#M96737</link>
      <description>I have several K-Class servers that I manage running HPUX 10.20. I would to determine the last time each user logged into the system on each of these servers or the last date used. Is there another method to extract this information other that using the 'last -R' command? This information is usally contained in the wtmp. This there another log that my contain this information?</description>
      <pubDate>Thu, 12 Dec 2002 15:36:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/hpux-10-20-last-user-login/m-p/2863275#M96737</guid>
      <dc:creator>LG Porter</dc:creator>
      <dc:date>2002-12-12T15:36:04Z</dc:date>
    </item>
    <item>
      <title>Re: HPUX 10.20: Last User Login</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/hpux-10-20-last-user-login/m-p/2863276#M96738</link>
      <description>last -R is the main one, although if you clear out your wtmp file, you lose the info.&lt;BR /&gt;&lt;BR /&gt;If you need a different way of doing it, change /etc/profile and /etc/csh.login so that at the end of each, it does a &lt;BR /&gt;&lt;BR /&gt;touch $HOME/.lastlogin&lt;BR /&gt;&lt;BR /&gt;This then creates a file called .lastlogin in each users home directory which you can then use to see when the last logged in.</description>
      <pubDate>Thu, 12 Dec 2002 15:41:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/hpux-10-20-last-user-login/m-p/2863276#M96738</guid>
      <dc:creator>Chris Wilshaw</dc:creator>
      <dc:date>2002-12-12T15:41:22Z</dc:date>
    </item>
    <item>
      <title>Re: HPUX 10.20: Last User Login</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/hpux-10-20-last-user-login/m-p/2863277#M96739</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;You could try the last accessed date on their .profile but it's not foolproof.&lt;BR /&gt;&lt;BR /&gt;wtmp *is* the logfile that contains this information but it's good practice to tidy it regularly so you could lose information.&lt;BR /&gt;&lt;BR /&gt;How about amending /etc/profile or .profile to simply write the current date/time to a file based on ${LOGNAME}.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;John</description>
      <pubDate>Thu, 12 Dec 2002 15:41:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/hpux-10-20-last-user-login/m-p/2863277#M96739</guid>
      <dc:creator>John Palmer</dc:creator>
      <dc:date>2002-12-12T15:41:26Z</dc:date>
    </item>
    <item>
      <title>Re: HPUX 10.20: Last User Login</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/hpux-10-20-last-user-login/m-p/2863278#M96740</link>
      <description>why not just look at the date of the users&lt;BR /&gt;.sh_history file?</description>
      <pubDate>Thu, 12 Dec 2002 15:45:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/hpux-10-20-last-user-login/m-p/2863278#M96740</guid>
      <dc:creator>Paul Sperry</dc:creator>
      <dc:date>2002-12-12T15:45:35Z</dc:date>
    </item>
    <item>
      <title>Re: HPUX 10.20: Last User Login</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/hpux-10-20-last-user-login/m-p/2863279#M96741</link>
      <description>Hi Paul,&lt;BR /&gt;&lt;BR /&gt;I initially thought of that but it's going to be the time they logged out (or issued the last command if still logged in) rather than the time they logged in. It does match the requested criteria 'or the last date used' though.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;John</description>
      <pubDate>Thu, 12 Dec 2002 15:51:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/hpux-10-20-last-user-login/m-p/2863279#M96741</guid>
      <dc:creator>John Palmer</dc:creator>
      <dc:date>2002-12-12T15:51:10Z</dc:date>
    </item>
    <item>
      <title>Re: HPUX 10.20: Last User Login</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/hpux-10-20-last-user-login/m-p/2863280#M96742</link>
      <description>I would've said the same as John, check the last date used of their .profile file:&lt;BR /&gt;&lt;BR /&gt;# ls -ltu /home/chuckj/.profile&lt;BR /&gt;&lt;BR /&gt;For future, you could write a script that gets executed via /etc/profile that creates a file with the data you require.&lt;BR /&gt;&lt;BR /&gt;Or, if you want to do it for all users at this polint in time you could write a script that something like:&lt;BR /&gt;&lt;BR /&gt; cd /home&lt;BR /&gt; for user in *.*&lt;BR /&gt; do&lt;BR /&gt;    ls -ltu /home/chuckj/.profile &amp;gt;&amp;gt; /tmp/lastlogin&lt;BR /&gt; &lt;BR /&gt;etc...&lt;BR /&gt;&lt;BR /&gt;Chuck J</description>
      <pubDate>Thu, 12 Dec 2002 15:51:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/hpux-10-20-last-user-login/m-p/2863280#M96742</guid>
      <dc:creator>Chuck J</dc:creator>
      <dc:date>2002-12-12T15:51:46Z</dc:date>
    </item>
    <item>
      <title>Re: HPUX 10.20: Last User Login</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/hpux-10-20-last-user-login/m-p/2863281#M96743</link>
      <description>I would've said the same as John, check the last date used of their .profile file:&lt;BR /&gt;&lt;BR /&gt;# ls -ltu /home/chuckj/.profile&lt;BR /&gt;&lt;BR /&gt;For future, you could write a script that gets executed via /etc/profile that creates a file with the data you require.&lt;BR /&gt;&lt;BR /&gt;Or, if you want to do it for all users at this polint in time you could write a script that something like:&lt;BR /&gt;&lt;BR /&gt; cd /home&lt;BR /&gt; for user in *.*&lt;BR /&gt; do&lt;BR /&gt;    ls -ltu /home/$user/.profile &amp;gt;&amp;gt; /tmp/lastlogin&lt;BR /&gt; &lt;BR /&gt;etc...&lt;BR /&gt;&lt;BR /&gt;Chuck J</description>
      <pubDate>Thu, 12 Dec 2002 15:52:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/hpux-10-20-last-user-login/m-p/2863281#M96743</guid>
      <dc:creator>Chuck J</dc:creator>
      <dc:date>2002-12-12T15:52:18Z</dc:date>
    </item>
    <item>
      <title>Re: HPUX 10.20: Last User Login</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/hpux-10-20-last-user-login/m-p/2863282#M96744</link>
      <description>All Unices have Berkely System Accounting on them or available.   Solaris, AIX, and Linux have it is add on products, but Irix and HP-UX have built in accounting.&lt;BR /&gt;&lt;BR /&gt;In most sites, I run accounting even if I dont really use it.  It keeps the /var/atm/*tmp files clean, as well as gets me info when I need it.&lt;BR /&gt;&lt;BR /&gt;man accounting&lt;BR /&gt;&lt;BR /&gt;It's relatively simple to setup.&lt;BR /&gt;change /etc/rc.config.d/acct file START_ACCT=0 to START_ACCT=1.&lt;BR /&gt;&lt;BR /&gt;Run /usr/sbin/acct/turnacct on&lt;BR /&gt;&lt;BR /&gt;The man pages will tell you what to run in cron, as well as other utilities you can use to extract data from reports.&lt;BR /&gt;&lt;BR /&gt;The only thing the man pages dont tell you, is that you need to periodically clean up /var/adm/acct/sum, especially if your running daily accounting.&lt;BR /&gt;&lt;BR /&gt;Accounting gets you lots of info, and in my opinion is worth setting up on all systems mainly because I have information when I need it for processes that ran, who the cpu hogs are, disk hogs, last logins, etc...&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Shannon</description>
      <pubDate>Thu, 12 Dec 2002 15:59:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/hpux-10-20-last-user-login/m-p/2863282#M96744</guid>
      <dc:creator>Shannon Petry</dc:creator>
      <dc:date>2002-12-12T15:59:02Z</dc:date>
    </item>
  </channel>
</rss>

