<?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: SECURE LOGIN in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/secure-login/m-p/4064951#M306502</link>
    <description>Hello,&lt;BR /&gt;&lt;BR /&gt;I implemented a simple solution for Oracle&lt;BR /&gt;accounts for a Fortune-100 company recently.&lt;BR /&gt;They wanted a free (open-source) and portable &lt;BR /&gt;solution that worked for HP-UX, Linux and &lt;BR /&gt;SunOS (Solaris).&lt;BR /&gt;&lt;BR /&gt;In fact, my Knowledge Brief is just about to&lt;BR /&gt;be published for HP staff.&lt;BR /&gt;&lt;BR /&gt;Short summary for ITRC:&lt;BR /&gt;&lt;BR /&gt;a) Disable all standard but obsolete&lt;BR /&gt;protocols (telnet, rlogin, rsh, ...).&lt;BR /&gt;I do this on all servesr anyway :)&lt;BR /&gt;&lt;BR /&gt;b) Disable CDE, X-windows logins&lt;BR /&gt;(not many use it nowdays).&lt;BR /&gt;&lt;BR /&gt;c) Set DenyUsers in sshd_config:&lt;BR /&gt;&lt;BR /&gt;DenyUsers oracle&lt;BR /&gt;&lt;BR /&gt;That way, user oracle cannot log in&lt;BR /&gt;via SSH.&lt;BR /&gt;&lt;BR /&gt;d) Install SUDO and SUDOSH (either compile&lt;BR /&gt;them or get packages). For HP-UX,&lt;BR /&gt;I could not find ported version of SUDOSH&lt;BR /&gt;so I had to build it myself.&lt;BR /&gt;&lt;BR /&gt;e) Set up sudoers file. For example:&lt;BR /&gt;&lt;BR /&gt;User_Alias DBA=dba1,dba2&lt;BR /&gt;DBA ALL=(oracle) /usr/local/bin/sudosh&lt;BR /&gt;&lt;BR /&gt;f) Then, as user dba1 or dba2:&lt;BR /&gt;&lt;BR /&gt;sudo -u oracle /usr/local/bin/sudosh&lt;BR /&gt;&lt;BR /&gt;The beauty of SUDOSH is that it also&lt;BR /&gt;keeps a log of ALL commands that&lt;BR /&gt;are executed. Admin can even do this:&lt;BR /&gt;&lt;BR /&gt;sudosh-replay&lt;BR /&gt;&lt;BR /&gt;Excellent for those which are&lt;BR /&gt;obsessed with SOX-compliance.&lt;BR /&gt;&lt;BR /&gt;Cheers,&lt;BR /&gt;&lt;BR /&gt;VK2COT&lt;BR /&gt;&lt;BR /&gt;PS. I also tested various solutions&lt;BR /&gt;(but they are all different for various&lt;BR /&gt;flavours of Unix) based on PAM, and Role&lt;BR /&gt;Based Access Control.&lt;BR /&gt;&lt;BR /&gt;Finally, companies that do not&lt;BR /&gt;have budgetary constraints would&lt;BR /&gt;definitely like PowerBroker (commercial&lt;BR /&gt;product).</description>
    <pubDate>Tue, 04 Sep 2007 15:44:29 GMT</pubDate>
    <dc:creator>VK2COT</dc:creator>
    <dc:date>2007-09-04T15:44:29Z</dc:date>
    <item>
      <title>SECURE LOGIN</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/secure-login/m-p/4064946#M306497</link>
      <description>How do I stop users logging in directly as oracle or any other power users?  The same way that /etc/securetty works for root.&lt;BR /&gt;&lt;BR /&gt;Chris C</description>
      <pubDate>Tue, 04 Sep 2007 06:21:49 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/secure-login/m-p/4064946#M306497</guid>
      <dc:creator>Chris Chaoman</dc:creator>
      <dc:date>2007-09-04T06:21:49Z</dc:date>
    </item>
    <item>
      <title>Re: SECURE LOGIN</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/secure-login/m-p/4064947#M306498</link>
      <description>Enter some direct text in the password field. That will prevent users from being able to enter a correct password.&lt;BR /&gt;You can allways become oracle executing "su" as root without needing a password.&lt;BR /&gt;&lt;BR /&gt;This setup is possibly not that quickly to do. We configured our software-accounts like that from the beginnen and use .rhosts and .shosts to configure who is allowed to ogin as who. If you have scripts or other programs that depend on the oracle account password, you should modify those scripts first.</description>
      <pubDate>Tue, 04 Sep 2007 06:31:42 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/secure-login/m-p/4064947#M306498</guid>
      <dc:creator>Wim Rombauts</dc:creator>
      <dc:date>2007-09-04T06:31:42Z</dc:date>
    </item>
    <item>
      <title>Re: SECURE LOGIN</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/secure-login/m-p/4064948#M306499</link>
      <description>Chris, &lt;BR /&gt;&lt;BR /&gt;You could do something like this: create a file, say .idnams and put in the IDs you do not want to have direct logins to, i.e. "oracle". Then in /etc/profile add;&lt;BR /&gt;grep $LOGNAME /var/adm/.idnams&lt;BR /&gt;if [ "$?" = "0" ]&lt;BR /&gt; then&lt;BR /&gt;   echo "You must login with your own ID and then 'su' to $LOGNAME"&lt;BR /&gt;   sleep 5&lt;BR /&gt;   exit&lt;BR /&gt;fi&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Robert&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 04 Sep 2007 10:05:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/secure-login/m-p/4064948#M306499</guid>
      <dc:creator>Robert Salter</dc:creator>
      <dc:date>2007-09-04T10:05:12Z</dc:date>
    </item>
    <item>
      <title>Re: SECURE LOGIN</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/secure-login/m-p/4064949#M306500</link>
      <description>&amp;gt;Robert: grep $LOGNAME /var/adm/.idnams&lt;BR /&gt;if [ "$?" = "0" ]; then&lt;BR /&gt;&lt;BR /&gt;You should clean this up so the grep doesn't get echoed for everyone:&lt;BR /&gt;grep -q $LOGNAME /var/adm/.idnams&lt;BR /&gt;if [ $? -eq 0 ]; then</description>
      <pubDate>Tue, 04 Sep 2007 11:53:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/secure-login/m-p/4064949#M306500</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2007-09-04T11:53:02Z</dc:date>
    </item>
    <item>
      <title>Re: SECURE LOGIN</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/secure-login/m-p/4064950#M306501</link>
      <description>Thanks Dennis, your way is cleaner.</description>
      <pubDate>Tue, 04 Sep 2007 12:57:03 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/secure-login/m-p/4064950#M306501</guid>
      <dc:creator>Robert Salter</dc:creator>
      <dc:date>2007-09-04T12:57:03Z</dc:date>
    </item>
    <item>
      <title>Re: SECURE LOGIN</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/secure-login/m-p/4064951#M306502</link>
      <description>Hello,&lt;BR /&gt;&lt;BR /&gt;I implemented a simple solution for Oracle&lt;BR /&gt;accounts for a Fortune-100 company recently.&lt;BR /&gt;They wanted a free (open-source) and portable &lt;BR /&gt;solution that worked for HP-UX, Linux and &lt;BR /&gt;SunOS (Solaris).&lt;BR /&gt;&lt;BR /&gt;In fact, my Knowledge Brief is just about to&lt;BR /&gt;be published for HP staff.&lt;BR /&gt;&lt;BR /&gt;Short summary for ITRC:&lt;BR /&gt;&lt;BR /&gt;a) Disable all standard but obsolete&lt;BR /&gt;protocols (telnet, rlogin, rsh, ...).&lt;BR /&gt;I do this on all servesr anyway :)&lt;BR /&gt;&lt;BR /&gt;b) Disable CDE, X-windows logins&lt;BR /&gt;(not many use it nowdays).&lt;BR /&gt;&lt;BR /&gt;c) Set DenyUsers in sshd_config:&lt;BR /&gt;&lt;BR /&gt;DenyUsers oracle&lt;BR /&gt;&lt;BR /&gt;That way, user oracle cannot log in&lt;BR /&gt;via SSH.&lt;BR /&gt;&lt;BR /&gt;d) Install SUDO and SUDOSH (either compile&lt;BR /&gt;them or get packages). For HP-UX,&lt;BR /&gt;I could not find ported version of SUDOSH&lt;BR /&gt;so I had to build it myself.&lt;BR /&gt;&lt;BR /&gt;e) Set up sudoers file. For example:&lt;BR /&gt;&lt;BR /&gt;User_Alias DBA=dba1,dba2&lt;BR /&gt;DBA ALL=(oracle) /usr/local/bin/sudosh&lt;BR /&gt;&lt;BR /&gt;f) Then, as user dba1 or dba2:&lt;BR /&gt;&lt;BR /&gt;sudo -u oracle /usr/local/bin/sudosh&lt;BR /&gt;&lt;BR /&gt;The beauty of SUDOSH is that it also&lt;BR /&gt;keeps a log of ALL commands that&lt;BR /&gt;are executed. Admin can even do this:&lt;BR /&gt;&lt;BR /&gt;sudosh-replay&lt;BR /&gt;&lt;BR /&gt;Excellent for those which are&lt;BR /&gt;obsessed with SOX-compliance.&lt;BR /&gt;&lt;BR /&gt;Cheers,&lt;BR /&gt;&lt;BR /&gt;VK2COT&lt;BR /&gt;&lt;BR /&gt;PS. I also tested various solutions&lt;BR /&gt;(but they are all different for various&lt;BR /&gt;flavours of Unix) based on PAM, and Role&lt;BR /&gt;Based Access Control.&lt;BR /&gt;&lt;BR /&gt;Finally, companies that do not&lt;BR /&gt;have budgetary constraints would&lt;BR /&gt;definitely like PowerBroker (commercial&lt;BR /&gt;product).</description>
      <pubDate>Tue, 04 Sep 2007 15:44:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/secure-login/m-p/4064951#M306502</guid>
      <dc:creator>VK2COT</dc:creator>
      <dc:date>2007-09-04T15:44:29Z</dc:date>
    </item>
    <item>
      <title>Re: SECURE LOGIN</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/secure-login/m-p/4064952#M306503</link>
      <description>I'd also recommend some free tools that give you better granularity of control than sudo/powerbroker:&lt;BR /&gt;&lt;BR /&gt;Select Access for IdMI (role-based access), and HP-UX Bastille (for lockdown and security-configuration reporting).&lt;BR /&gt;&lt;BR /&gt;Also, I'm a little nervous about relying on Robert/Dennis' approach.  I suspect (though haven't tested it), that an interrupt or shell escape could get a user past that check in the profile.</description>
      <pubDate>Wed, 05 Sep 2007 12:22:56 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/secure-login/m-p/4064952#M306503</guid>
      <dc:creator>Robert Fritz</dc:creator>
      <dc:date>2007-09-05T12:22:56Z</dc:date>
    </item>
    <item>
      <title>Re: SECURE LOGIN</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/secure-login/m-p/4064953#M306504</link>
      <description>&amp;gt;Robert: that an interrupt or shell escape could get a user past that check in the profile.&lt;BR /&gt;&lt;BR /&gt;I would think that would just exit the shell.</description>
      <pubDate>Wed, 05 Sep 2007 18:39:01 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/secure-login/m-p/4064953#M306504</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2007-09-05T18:39:01Z</dc:date>
    </item>
    <item>
      <title>Re: SECURE LOGIN</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/secure-login/m-p/4064954#M306505</link>
      <description>Actually it's probably better to use "if grep -q foo ; then" intead of grep followed by a comparison with $?. But either way, it's still wrong for what you're trying to do.&lt;BR /&gt;&lt;BR /&gt;/etc/profile is only called for a login shell. If you specify a remote command you won't invoke a login shell. "ssh -t user@host /usr/bin/sh" will give you an interactive shell without running /etc/profile, unless you've taken special steps to prevent it. Most of the time it'll be easier to find a better way than it will be to force a call to /etc/profile.&lt;BR /&gt;&lt;BR /&gt;I've demonstrated this several times for people. It usually leads to a surprised look followed by a long explanation of how remote shells work and how shells decide what login scripts to run.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;For the most part Dusan's advice looks correct to me, but I do have a couple comments on it.&lt;BR /&gt;&lt;BR /&gt;I would recommend EAS over sudosh, if you can still find it anywhere. It fixed a lot of the shortcomings of sudosh and added support for logging to a network server. Unfortunately, I think some company bought the rights from the original author and quickly took down the source so they could sell a new version as part of their product instead....&lt;BR /&gt;&lt;BR /&gt;I would also recommend using AllowGroups and DenyGroups instead of AllowUsers and DenyUsers in sshd_config. Using a group makes the access control part of account management, listing individual users in sshd_config makes access control part of sshd administration.&lt;BR /&gt;</description>
      <pubDate>Thu, 06 Sep 2007 10:53:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/secure-login/m-p/4064954#M306505</guid>
      <dc:creator>Heironimus</dc:creator>
      <dc:date>2007-09-06T10:53:34Z</dc:date>
    </item>
  </channel>
</rss>

