<?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: root login in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/root-login/m-p/2418176#M765776</link>
    <description>Hi Nick,&lt;BR /&gt;&lt;BR /&gt;All bad logins are stored in the /var/adm/btmp in a binary format.  To show &lt;BR /&gt;these in a readable format, you use the lastb command (similar to the last &lt;BR /&gt;command for successful logins).  &lt;BR /&gt;&lt;BR /&gt;For example:&lt;BR /&gt;&lt;BR /&gt;fred:/var/adm # lastb&lt;BR /&gt;asdf     pts/0        Tue Feb  8 07:58 &lt;BR /&gt;asdf     pts/0        Tue Feb  8 07:58 &lt;BR /&gt;root     pts/0        Tue Feb  8 07:58 &lt;BR /&gt;root     pts/tc       Fri Feb  4 15:05 &lt;BR /&gt;root     pts/tc       Fri Feb  4 15:05 &lt;BR /&gt;&lt;BR /&gt;As far as scripting it goes, it depends on how quickly you want to get this &lt;BR /&gt;information.  To be honest, I can't think of an easy way to trigger this &lt;BR /&gt;instantly.  &lt;BR /&gt;&lt;BR /&gt;What you can do though is schedule a cron job to check if the btmp file has &lt;BR /&gt;changed and display the last records since changing.  Or, if you don't want the &lt;BR /&gt;info in it you can empty the file each time and just do a lastb to show &lt;BR /&gt;everything in it.  This will also help maintain the size of the file.&lt;BR /&gt;&lt;BR /&gt;You could set this to run every minute, or once a day to produce a report each &lt;BR /&gt;morning.&lt;BR /&gt;&lt;BR /&gt;You may also want to look at the security and auditing options available &lt;BR /&gt;through SAM.  If you are running a trusted system (C2 level security) then you &lt;BR /&gt;can do more in terms of auditing.&lt;BR /&gt;&lt;BR /&gt;Hope this helps...&lt;BR /&gt;&lt;BR /&gt;Cheers,&lt;BR /&gt;Andrew Schafer&lt;BR /&gt;Australian Response Centre</description>
    <pubDate>Mon, 07 Feb 2000 13:26:47 GMT</pubDate>
    <dc:creator>Andrew Schafer_2</dc:creator>
    <dc:date>2000-02-07T13:26:47Z</dc:date>
    <item>
      <title>root login</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/root-login/m-p/2418175#M765775</link>
      <description>I would like to configure a script likely, that will email me when someone has &lt;BR /&gt;tried to logon as root and failed.&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;&lt;BR /&gt;Nickd&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 07 Feb 2000 11:27:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/root-login/m-p/2418175#M765775</guid>
      <dc:creator>Nick D'angelo_3</dc:creator>
      <dc:date>2000-02-07T11:27:26Z</dc:date>
    </item>
    <item>
      <title>Re: root login</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/root-login/m-p/2418176#M765776</link>
      <description>Hi Nick,&lt;BR /&gt;&lt;BR /&gt;All bad logins are stored in the /var/adm/btmp in a binary format.  To show &lt;BR /&gt;these in a readable format, you use the lastb command (similar to the last &lt;BR /&gt;command for successful logins).  &lt;BR /&gt;&lt;BR /&gt;For example:&lt;BR /&gt;&lt;BR /&gt;fred:/var/adm # lastb&lt;BR /&gt;asdf     pts/0        Tue Feb  8 07:58 &lt;BR /&gt;asdf     pts/0        Tue Feb  8 07:58 &lt;BR /&gt;root     pts/0        Tue Feb  8 07:58 &lt;BR /&gt;root     pts/tc       Fri Feb  4 15:05 &lt;BR /&gt;root     pts/tc       Fri Feb  4 15:05 &lt;BR /&gt;&lt;BR /&gt;As far as scripting it goes, it depends on how quickly you want to get this &lt;BR /&gt;information.  To be honest, I can't think of an easy way to trigger this &lt;BR /&gt;instantly.  &lt;BR /&gt;&lt;BR /&gt;What you can do though is schedule a cron job to check if the btmp file has &lt;BR /&gt;changed and display the last records since changing.  Or, if you don't want the &lt;BR /&gt;info in it you can empty the file each time and just do a lastb to show &lt;BR /&gt;everything in it.  This will also help maintain the size of the file.&lt;BR /&gt;&lt;BR /&gt;You could set this to run every minute, or once a day to produce a report each &lt;BR /&gt;morning.&lt;BR /&gt;&lt;BR /&gt;You may also want to look at the security and auditing options available &lt;BR /&gt;through SAM.  If you are running a trusted system (C2 level security) then you &lt;BR /&gt;can do more in terms of auditing.&lt;BR /&gt;&lt;BR /&gt;Hope this helps...&lt;BR /&gt;&lt;BR /&gt;Cheers,&lt;BR /&gt;Andrew Schafer&lt;BR /&gt;Australian Response Centre</description>
      <pubDate>Mon, 07 Feb 2000 13:26:47 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/root-login/m-p/2418176#M765776</guid>
      <dc:creator>Andrew Schafer_2</dc:creator>
      <dc:date>2000-02-07T13:26:47Z</dc:date>
    </item>
    <item>
      <title>Re: root login</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/root-login/m-p/2418177#M765777</link>
      <description>Probably a good idea is to disable root login from anything other than the &lt;BR /&gt;console via /etc/securetty then you can monitor the sulog by doing something &lt;BR /&gt;like this from a cron job&lt;BR /&gt;&lt;BR /&gt;grep " - " /var/adm/sulog | grep -i root | mail username&lt;BR /&gt;&lt;BR /&gt;This will give you all bad su attempts, change the - to a + for all the good &lt;BR /&gt;attempts.</description>
      <pubDate>Mon, 07 Feb 2000 21:23:11 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/root-login/m-p/2418177#M765777</guid>
      <dc:creator>Anthony Goonetilleke_1</dc:creator>
      <dc:date>2000-02-07T21:23:11Z</dc:date>
    </item>
  </channel>
</rss>

