<?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 Control user access to servers using LDAP in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/control-user-access-to-servers-using-ldap/m-p/5214812#M465636</link>
    <description>We have a hundred servers which are grouped by some kind of function.  Some users are allowed to log onto servers in group A but not group B while other users are allowed to log onto servers in group B but not group A. (This is a simplified scenario for discussion.  In reality, we have many such groups).&lt;BR /&gt;&lt;BR /&gt;Currently we are using DCE for authentication and want to move to LDAP, but I can not find any documentation that explains how to set up LDAP to allow this functionality.  How do other companies do this?&lt;BR /&gt;&lt;BR /&gt;We are running a mix of HP-UX v1, v2 and v3 servers in our environment.&lt;BR /&gt;&lt;BR /&gt;Thanks in advance,&lt;BR /&gt;jls</description>
    <pubDate>Wed, 16 Dec 2009 15:08:39 GMT</pubDate>
    <dc:creator>Joel Shank</dc:creator>
    <dc:date>2009-12-16T15:08:39Z</dc:date>
    <item>
      <title>Control user access to servers using LDAP</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/control-user-access-to-servers-using-ldap/m-p/5214812#M465636</link>
      <description>We have a hundred servers which are grouped by some kind of function.  Some users are allowed to log onto servers in group A but not group B while other users are allowed to log onto servers in group B but not group A. (This is a simplified scenario for discussion.  In reality, we have many such groups).&lt;BR /&gt;&lt;BR /&gt;Currently we are using DCE for authentication and want to move to LDAP, but I can not find any documentation that explains how to set up LDAP to allow this functionality.  How do other companies do this?&lt;BR /&gt;&lt;BR /&gt;We are running a mix of HP-UX v1, v2 and v3 servers in our environment.&lt;BR /&gt;&lt;BR /&gt;Thanks in advance,&lt;BR /&gt;jls</description>
      <pubDate>Wed, 16 Dec 2009 15:08:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/control-user-access-to-servers-using-ldap/m-p/5214812#M465636</guid>
      <dc:creator>Joel Shank</dc:creator>
      <dc:date>2009-12-16T15:08:39Z</dc:date>
    </item>
    <item>
      <title>Re: Control user access to servers using LDAP</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/control-user-access-to-servers-using-ldap/m-p/5214813#M465637</link>
      <description>The "compat" mode can do what you're looking for, in conjunction with netgroups.&lt;BR /&gt;&lt;BR /&gt;/etc/nsswitch.conf&lt;BR /&gt;---&lt;BR /&gt;passwd: compat&lt;BR /&gt;passwd_compat: ldap&lt;BR /&gt;---&lt;BR /&gt;&lt;BR /&gt;This means that any "+" entries in the local passwd file will be referenced out to LDAP.&lt;BR /&gt;&lt;BR /&gt;So here's what you do:&lt;BR /&gt;&lt;BR /&gt;First, set the users who are to be restricted to have a default shell of /dev/null.&lt;BR /&gt;&lt;BR /&gt;This means that they will not be able to log in to any machine in the LDAP domain, by default.&lt;BR /&gt;&lt;BR /&gt;Then, set up netgroups in LDAP:&lt;BR /&gt;&lt;BR /&gt;netgroups:&lt;BR /&gt;----&lt;BR /&gt;groupA (,u1,) (,u2,) (server1A,,) (server2A,,)&lt;BR /&gt;&lt;BR /&gt;groupB (,u3,) (,u4,) (server1B,,) (server2B,,)&lt;BR /&gt;----&lt;BR /&gt;&lt;BR /&gt;passwd on groupA hosts:&lt;BR /&gt;----&lt;BR /&gt;+@groupA::::::/bin/csh&lt;BR /&gt;---&lt;BR /&gt;&lt;BR /&gt;passwd on groupB hosts:&lt;BR /&gt;----&lt;BR /&gt;+@groupB::::::/bin/csh&lt;BR /&gt;---&lt;BR /&gt;&lt;BR /&gt;These +@ entries, coupled with the "compat" mode in nsswitch.conf, will override the default /dev/null shell for the users in the specified groups, allowing them to log into the machine in question.&lt;BR /&gt;&lt;BR /&gt;If you name your netgroups so that they can be recognized by a regular expression, you can use a cron job to maintain these +@ entries in the local passwd file.&lt;BR /&gt;&lt;BR /&gt;The script would compare the access-restriction netgroups with the list of +@ entries in the passwd. That is, if the host sees its own hostname as a member of an access-restriction netgroup, it would add the +@ entry if it's not already there.  If it sees a +@ netgroup entry for which its hostname is not a member, it would remove it from the passwd file.&lt;BR /&gt;&lt;BR /&gt;If you don't want to block access to ALL machines for the users in question, you'd need to add a shell override line for everyone except authorized users and netgroups:&lt;BR /&gt;&lt;BR /&gt;/etc/passwd&lt;BR /&gt;---&lt;BR /&gt;+@groupA::::::&lt;BR /&gt;+@sysadmins::::::&lt;BR /&gt;+::::::/dev/null&lt;BR /&gt;---&lt;BR /&gt;&lt;BR /&gt;This would mean that only members of groupA and the sysadmins netgroups would be allowed to log in to this particular machine, and everyone else would be blocked, while any machine configured normally would also be accessible to the groupA users.&lt;BR /&gt;&lt;BR /&gt;I developed this technique while my prior employer was selling off business lines ahead of its impending bankruptcy (little did we know), to allow users attached to the purchaser to access only the machines they'd purchased until we could peel them off the network and hand them off to the purchaser's sysadmins.</description>
      <pubDate>Thu, 17 Dec 2009 13:43:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/control-user-access-to-servers-using-ldap/m-p/5214813#M465637</guid>
      <dc:creator>mvpel</dc:creator>
      <dc:date>2009-12-17T13:43:26Z</dc:date>
    </item>
    <item>
      <title>Re: Control user access to servers using LDAP</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/control-user-access-to-servers-using-ldap/m-p/5214814#M465638</link>
      <description>Thank you mvpel.  This looks like a way of doing what I need.</description>
      <pubDate>Fri, 18 Dec 2009 14:44:42 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/control-user-access-to-servers-using-ldap/m-p/5214814#M465638</guid>
      <dc:creator>Joel Shank</dc:creator>
      <dc:date>2009-12-18T14:44:42Z</dc:date>
    </item>
  </channel>
</rss>

