<?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: lastb command security in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/lastb-command-security/m-p/4500120#M732964</link>
    <description>Any possibility for that there are alias definition for "sudo lastb" for users and there is sudo rights for lastb command?</description>
    <pubDate>Fri, 18 Sep 2009 11:33:52 GMT</pubDate>
    <dc:creator>Turgay Cavdar</dc:creator>
    <dc:date>2009-09-18T11:33:52Z</dc:date>
    <item>
      <title>lastb command security</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/lastb-command-security/m-p/4500114#M732958</link>
      <description>based on experience on HP-UX 11iv1, I noticed that lastb command has following privileges as everyone is able to execute :&lt;BR /&gt;&lt;BR /&gt;# ll /usr/bin/lastb&lt;BR /&gt;-r-xr-xr-x   2 root       sys          16384 Nov  9  2000 /usr/bin/lastb&lt;BR /&gt;&lt;BR /&gt;OK, but in terms of Users can mistakenly enter their passwords as a username when logging in what will happens:&lt;BR /&gt;# lastb -R | more  &lt;BR /&gt;rr oot   pts/ta       192.168.xx.x     Tue Sep 15 22:04 &lt;BR /&gt;a1b1c2     pts/tb       192.168.xx.x     Mon Sep 14 18:57 &lt;BR /&gt;1a1b1c     pts/ta       192.168.xx.x     Mon Sep 14 16:57 &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;the left column has some passwords , in my example a1b1c2 is probably password. So I am confused, and I think it needs to be careful about lastb maybe Admins can write a crontab script to trim /var/adm/btmp&lt;BR /&gt; from time to time . .&lt;BR /&gt;&lt;BR /&gt;I there anybody knows anymore what I do not know ?</description>
      <pubDate>Fri, 18 Sep 2009 07:45:44 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/lastb-command-security/m-p/4500114#M732958</guid>
      <dc:creator>Hakki Aydin Ucar</dc:creator>
      <dc:date>2009-09-18T07:45:44Z</dc:date>
    </item>
    <item>
      <title>Re: lastb command security</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/lastb-command-security/m-p/4500115#M732959</link>
      <description>Normally lastb can be used by only root. The ownership of /var/adm/btmps must be root and permissions must be 600. Checl lastb man page:&lt;BR /&gt;The lastb command searches backwards through the database file /var/adm/btmps to display bad login information.  Access to /var/adm/btmps should be restricted to users with appropriate privileges (owned by and readable only by root) because it may contain password information.</description>
      <pubDate>Fri, 18 Sep 2009 07:57:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/lastb-command-security/m-p/4500115#M732959</guid>
      <dc:creator>Turgay Cavdar</dc:creator>
      <dc:date>2009-09-18T07:57:39Z</dc:date>
    </item>
    <item>
      <title>Re: lastb command security</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/lastb-command-security/m-p/4500116#M732960</link>
      <description>Yes , this the reason I m shocked, in all my customer servers it is readable by everybody :&lt;BR /&gt;&lt;BR /&gt;# ll /var/adm/btmp &lt;BR /&gt;-rw-rw-rw-   1 root       sys             60 Sep 13 03:00 /var/adm/btmp&lt;BR /&gt;&lt;BR /&gt;weird?&lt;BR /&gt;</description>
      <pubDate>Fri, 18 Sep 2009 08:11:24 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/lastb-command-security/m-p/4500116#M732960</guid>
      <dc:creator>Hakki Aydin Ucar</dc:creator>
      <dc:date>2009-09-18T08:11:24Z</dc:date>
    </item>
    <item>
      <title>Re: lastb command security</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/lastb-command-security/m-p/4500117#M732961</link>
      <description>Something is wrong about the permissions of your files. Not only readable, but also writable :)) Too bad...</description>
      <pubDate>Fri, 18 Sep 2009 08:36:52 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/lastb-command-security/m-p/4500117#M732961</guid>
      <dc:creator>Turgay Cavdar</dc:creator>
      <dc:date>2009-09-18T08:36:52Z</dc:date>
    </item>
    <item>
      <title>Re: lastb command security</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/lastb-command-security/m-p/4500118#M732962</link>
      <description>&amp;gt;I noticed that lastb command has following privileges as everyone is able to execute&lt;BR /&gt;&lt;BR /&gt;Not really, it checks:&lt;BR /&gt;$ /usr/bin/lastb&lt;BR /&gt;lastb can be invoked only by root. Exiting ....</description>
      <pubDate>Fri, 18 Sep 2009 08:50:17 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/lastb-command-security/m-p/4500118#M732962</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2009-09-18T08:50:17Z</dc:date>
    </item>
    <item>
      <title>Re: lastb command security</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/lastb-command-security/m-p/4500119#M732963</link>
      <description>&amp;gt;Dennis: it checks . .&lt;BR /&gt;&lt;BR /&gt;Not really, look at this one, user is ordinary user.&lt;BR /&gt;&lt;BR /&gt;$ who am i&lt;BR /&gt;aydin  pts/1        Sep 18 10:47&lt;BR /&gt;$ lastb -R&lt;BR /&gt;unknown  gold:17233   servisnet        Thu Sep 10 13:04 &lt;BR /&gt;root     pts/ta       servisnet        Wed Sep  9 17:41 &lt;BR /&gt;root     pts/ta       servisnet        Wed Sep  9 17:41 &lt;BR /&gt;&lt;BR /&gt;So, I confused that is this related with our server setup or generic problem ?</description>
      <pubDate>Fri, 18 Sep 2009 10:29:57 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/lastb-command-security/m-p/4500119#M732963</guid>
      <dc:creator>Hakki Aydin Ucar</dc:creator>
      <dc:date>2009-09-18T10:29:57Z</dc:date>
    </item>
    <item>
      <title>Re: lastb command security</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/lastb-command-security/m-p/4500120#M732964</link>
      <description>Any possibility for that there are alias definition for "sudo lastb" for users and there is sudo rights for lastb command?</description>
      <pubDate>Fri, 18 Sep 2009 11:33:52 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/lastb-command-security/m-p/4500120#M732964</guid>
      <dc:creator>Turgay Cavdar</dc:creator>
      <dc:date>2009-09-18T11:33:52Z</dc:date>
    </item>
    <item>
      <title>Re: lastb command security</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/lastb-command-security/m-p/4500121#M732965</link>
      <description>On my 11.0 and 11.11 systems, if the user has permission to read the /var/adm/btmp file, then they can also run the lastb command.  As a result, we have restricted permission to 600 on /var/adm/btmp.  This does NOT prevent records from being written to the file.&lt;BR /&gt;&lt;BR /&gt;However, on my 11.23 system I get the message that lastb can only be run as root.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 18 Sep 2009 12:36:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/lastb-command-security/m-p/4500121#M732965</guid>
      <dc:creator>Patrick Wallek</dc:creator>
      <dc:date>2009-09-18T12:36:13Z</dc:date>
    </item>
    <item>
      <title>Re: lastb command security</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/lastb-command-security/m-p/4500122#M732966</link>
      <description>/var/adm/btmp must always be set to 600 permissions. Some root user has hacked the setting for an unknown reason. It is quite true that btmp will contain passwords typed by careless users. That's why it must be protected. Since 666 is very suspicious, I would run swverify to check all the HP-UX files.</description>
      <pubDate>Sat, 19 Sep 2009 04:12:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/lastb-command-security/m-p/4500122#M732966</guid>
      <dc:creator>Bill Hassell</dc:creator>
      <dc:date>2009-09-19T04:12:18Z</dc:date>
    </item>
    <item>
      <title>Re: lastb command security</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/lastb-command-security/m-p/4500123#M732967</link>
      <description>&amp;gt;Patrick: if the user has permission to read the /var/adm/btmp file, then they can also run the lastb command.&lt;BR /&gt;&lt;BR /&gt;This is a moot point.  If you can read the file you can write your own lastb.&lt;BR /&gt;&lt;BR /&gt;&amp;gt;on my 11.23 system I get the message that lastb can only be run as root.&lt;BR /&gt;&lt;BR /&gt;Ah right, they fixed it there.</description>
      <pubDate>Sat, 19 Sep 2009 09:59:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/lastb-command-security/m-p/4500123#M732967</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2009-09-19T09:59:53Z</dc:date>
    </item>
    <item>
      <title>Re: lastb command security</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/lastb-command-security/m-p/4500124#M732968</link>
      <description>&amp;gt;Turgay:Any possibility for that there are alias definition for "sudo lastb" for users&lt;BR /&gt;I will check this in my lab, because I do not have sudo servers I am responsible.&lt;BR /&gt;&lt;BR /&gt;&amp;gt;Patrick:&lt;BR /&gt;I decided to modify permission to 600 on /var/adm/btmp in all servers, even though I am not sure how it happened? Apparently after rel. 11iv2 it is corrected .&lt;BR /&gt;&lt;BR /&gt;&amp;gt;Bill:&lt;BR /&gt;What I am looking for with swverify ?</description>
      <pubDate>Sat, 19 Sep 2009 10:13:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/lastb-command-security/m-p/4500124#M732968</guid>
      <dc:creator>Hakki Aydin Ucar</dc:creator>
      <dc:date>2009-09-19T10:13:32Z</dc:date>
    </item>
    <item>
      <title>Re: lastb command security</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/lastb-command-security/m-p/4500125#M732969</link>
      <description>&amp;gt;I decided to modify permission to 600 on /var/adm/btmp in all servers, even though I am not sure how it happened?&lt;BR /&gt;&lt;BR /&gt;How many servers were bad, any good?&lt;BR /&gt;I'm not sure if this logging is on by default but perhaps if not, when the file was created, root didn't have umask set securely.&lt;BR /&gt;&lt;BR /&gt;&amp;gt;Apparently after release 11iv2 it is corrected.&lt;BR /&gt;&lt;BR /&gt;Only lastb(1) was corrected, not the underlying security permissions on the file.&lt;BR /&gt;&lt;BR /&gt;&amp;gt;What I am looking for with swverify?&lt;BR /&gt;&lt;BR /&gt;Run: swverify \*&lt;BR /&gt;Then look for bad permissions on files/directories.</description>
      <pubDate>Sun, 20 Sep 2009 04:51:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/lastb-command-security/m-p/4500125#M732969</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2009-09-20T04:51:13Z</dc:date>
    </item>
    <item>
      <title>Re: lastb command security</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/lastb-command-security/m-p/4500126#M732970</link>
      <description>&amp;gt;Dennis : How many servers were bad, any good?&lt;BR /&gt;&lt;BR /&gt;20 servers in different locations have same problem.&lt;BR /&gt;&lt;BR /&gt;&amp;gt; " : when the file was created, root didn't have umask set securely.&lt;BR /&gt;&lt;BR /&gt;Probably, I am not sure ?&lt;BR /&gt;&lt;BR /&gt;&amp;gt; " : Only lastb(1) was corrected, not the underlying security permissions on the file.&lt;BR /&gt;&lt;BR /&gt;So , maybe it is better, both of /var/adm/btmp&lt;BR /&gt; and /usr/bin/lastb&lt;BR /&gt; must have 600 privilege ?&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;</description>
      <pubDate>Mon, 21 Sep 2009 08:29:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/lastb-command-security/m-p/4500126#M732970</guid>
      <dc:creator>Hakki Aydin Ucar</dc:creator>
      <dc:date>2009-09-21T08:29:18Z</dc:date>
    </item>
    <item>
      <title>Re: lastb command security</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/lastb-command-security/m-p/4500127#M732971</link>
      <description>&amp;gt;maybe it is better, both of /var/adm/btmp and /usr/bin/lastb must have 600 privilege?&lt;BR /&gt;&lt;BR /&gt;Only the file needs it.</description>
      <pubDate>Mon, 21 Sep 2009 09:55:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/lastb-command-security/m-p/4500127#M732971</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2009-09-21T09:55:13Z</dc:date>
    </item>
    <item>
      <title>Re: lastb command security</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/lastb-command-security/m-p/4500128#M732972</link>
      <description>Hi:&lt;BR /&gt;&lt;BR /&gt;So , maybe it is better, both of /var/adm/btmp&lt;BR /&gt;and /usr/bin/lastb must have 600 privilege ?&lt;BR /&gt;&lt;BR /&gt;Not unless you don't want to run 'lastb'.  After all, '/usr/bin/lastb' needs to be executed :-)&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Mon, 21 Sep 2009 10:52:06 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/lastb-command-security/m-p/4500128#M732972</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2009-09-21T10:52:06Z</dc:date>
    </item>
    <item>
      <title>Re: lastb command security</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/lastb-command-security/m-p/4500129#M732973</link>
      <description>&lt;BR /&gt;IMHO Hakki has a very valid concern but it is two-fold.&lt;BR /&gt;&lt;BR /&gt;The first part, some lastb components being accessible by 'normal' users is surely a bad setup.&lt;BR /&gt;&lt;BR /&gt;The second part, that the attempted usernames show up in clear print to root users worries and had always bothered me.&lt;BR /&gt;&lt;BR /&gt;For now I offer no solution, just a point to ponder. &lt;BR /&gt;Just like Hakki describes I have mistakenly entered my otherwise well-protected and well-chose, but shared amongst more system, password against the username prompt, instead of the password prompt. Clearly this is a user error. But it happens! Agreed?&lt;BR /&gt;&lt;BR /&gt;While a system manager is implicitly trusted on the system being managed, this trust IMHO does NOT extent to other systems.&lt;BR /&gt;&lt;BR /&gt;Whenever this happens to me, I'm very annoyed, and feel obliged to change my password. It would be nice to know that there was an option to NOT have the attempted username stored in clear print (only if it is a valid passwd entry?)&lt;BR /&gt;Admittedly this would reduce the ability for a system manager to assist users who repeatedly fat-finger or are mistaken about the username to use, but that's a price I would be willing to pay to be able to say that I can not have possibly seen a users passwords, that the system does not record potential passwords, even when fat-fingerd.&lt;BR /&gt;&lt;BR /&gt;Like I said... just a thought!&lt;BR /&gt;Hein.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 21 Sep 2009 11:10:44 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/lastb-command-security/m-p/4500129#M732973</guid>
      <dc:creator>Hein van den Heuvel</dc:creator>
      <dc:date>2009-09-21T11:10:44Z</dc:date>
    </item>
  </channel>
</rss>

