<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>thinking sysadmin &#187; ldap</title>
	<atom:link href="http://andyleonard.com/tag/ldap/feed/" rel="self" type="application/rss+xml" />
	<link>http://andyleonard.com</link>
	<description>qstat -u aleonard -s z</description>
	<lastBuildDate>Sun, 22 Jan 2012 03:46:31 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Using an OpenLDAP Proxy to Work Around Solaris/Active Directory Issues</title>
		<link>http://andyleonard.com/2011/01/06/using-an-openldap-proxy-to-work-around-solarisactive-directory-issues/</link>
		<comments>http://andyleonard.com/2011/01/06/using-an-openldap-proxy-to-work-around-solarisactive-directory-issues/#comments</comments>
		<pubDate>Thu, 06 Jan 2011 14:20:59 +0000</pubDate>
		<dc:creator>Andy</dc:creator>
				<category><![CDATA[operating systems]]></category>
		<category><![CDATA[active directory]]></category>
		<category><![CDATA[ldap]]></category>
		<category><![CDATA[nexenta]]></category>
		<category><![CDATA[nexentastor]]></category>
		<category><![CDATA[openldap]]></category>
		<category><![CDATA[opensolaris]]></category>
		<category><![CDATA[solaris]]></category>
		<category><![CDATA[vlv]]></category>

		<guid isPermaLink="false">http://andyleonard.com/?p=534</guid>
		<description><![CDATA[There is a long-standing bug in (Open)Solaris and derivatives (including NexentaStor) that breaks Active Directory interoperability: Beginning with Windows Server 2003, Active Directory supports VLV searches. Every VLV search request must be accompanied by 2 request controls: the SSS control and the VLV control. However, Active Directory imposes some general criteria on the SSS control: [...]]]></description>
			<content:encoded><![CDATA[<p>There is a long-standing <a href="http://bugs.opensolaris.org/bugdatabase/view_bug.do;jsessionid=31683749e13970e4d6f574c9550d?bug_id=6636343">bug</a> in (Open)Solaris and derivatives (including NexentaStor) that breaks Active Directory interoperability:</p>
<blockquote><p>Beginning with Windows Server 2003, Active Directory supports VLV searches.  Every VLV search request must be accompanied by 2 request controls: the SSS control and the VLV control.  However, Active Directory imposes some general criteria on the SSS control:</p>
<p>1. Cannot sort based on more than one sort keys/attributes.<br />
2. Cannot sort based on the &#8220;distinguishedName&#8221; attribute (presumably Microsoft does not use the &#8220;DN&#8221; attribute).<br />
3. Cannot sort based on a constructed attribute (presumably an attribute not stored on Active Directory).</p>
<p>Unfortunately, Solaris LDAP clients use 2 sort keys/attributes: &#8220;cn&#8221; and &#8220;uid&#8221; in the SSS control.  Subsequently, when dumping a container or a naming database, Solaris LDAP clients would receive LDAP_UNAVAILABLE_CRITICAL_EXTENSION.</p>
<p>$ ldaplist passwd<br />
ldaplist: Object not found (LDAP ERROR (12): Unavailable critical extension.)</p></blockquote>
<p>This issue has been detailed elsewhere, including at <a href="http://blogs.utexas.edu/hcoyote/2009/06/24/so-some-solaris-updates/">utexas.edu</a>.  There appear to be at least four solutions:</p>
<ol>
<li>Wait for the fix from <del datetime="2010-11-02T03:12:05+00:00">Sun</del> Oracle to reach the light of day: this bug was apparently fixed in SNV 144.  (I expect the fix is out in Solaris 11 Express now, but have not tested this myself.)</li>
<li>Apply the hotfix in Microsoft&#8217;s <a href="http://support.microsoft.com/kb/886683">KB886683</a> to your domain controllers, which will disable VLV.</li>
<li>Run separate ADAM instances with VLV disabled, and point your Solaris machines at them instead of directly at your domain controllers.  From the blog post linked above, it sounds like the University of Texas chose this route.</li>
<li>Use OpenLDAP as a proxy in front of Active Directory; configure your Solaris machines to use the proxies instead of Active Directory servers.  This is the solution detailed in this blog post.</li>
</ol>
<p><span id="more-534"></span><br />
<strong>Method</strong><br />
I tested on Ubuntu 10.04 here, although adaptation for your chosen OS is probably straightforward.</p>
<p>First, build OpenLDAP; we need several options not included in the default .deb, so we&#8217;ll do this from source, with the following &#8220;configure&#8221; options:</p>
<pre class="brush: plain; light: true; title: ; notranslate">
./configure --prefix=/opt/openldap --enable-meta --enable-ldap --enable-rewrite \
--enable-rwm
</pre>
<p>(You will probably also want to take the extra step of building a package for your OS, to ease configuration management.) </p>
<p>After installing OpenLDAP, edit slapd.conf to proxy to your domain controllers.  In this example, we&#8217;re pointing the proxies at some older Windows 2003 hosts using the Microsoft Services for Unix (SFU) extensions, so we&#8217;ll take this opportunity to make make what Solaris sees closer to <a href="http://www.ietf.org/rfc/rfc2307.txt">RFC 2307</a>-compliant and eliminate the need for <a href="http://blog.scottlowe.org/2007/04/25/solaris-10-ad-integration-version-3/">attributeMap arguments to ldapclient on the Solaris host</a>:</p>
<pre class="brush: plain; title: ; notranslate">
#
# See slapd.conf(5) for details on configuration options.
# This file should NOT be world readable.
#
include  /opt/openldap/etc/openldap/schema/core.schema
include  /opt/openldap/etc/openldap/schema/cosine.schema
include  /opt/openldap/etc/openldap/schema/inetorgperson.schema
include  /opt/openldap/etc/openldap/schema/nis.schema
include  /opt/openldap/etc/openldap/schema/mssfu30.schema

# Time out connections before the proxied bind drops:
idletimeout 60

pidfile  /var/run/slapd/slapd.pid
argsfile /var/run/slapd/slapd.args

access to dn.base=&quot;&quot; by * read
access to dn.base=&quot;cn=Subschema&quot; by * read
access to *
 by self write
 by users read
 by anonymous auth

loglevel   256

######################################################
# database definitions
######################################################

database ldap
suffix  &quot;dc=example,dc=com&quot;
uri  &quot;ldap://dc1.example.com ldap://dc2.example.com&quot;
acl-bind bindmethod=simple binddn=&quot;cn=ldapproxy,ou=Service Accounts,ou=Users,dc=example,dc=com&quot; credentials=secret

# Do mapping in OpenLDAP, instead of on client, eliminating need for
# AD schema attribute mapping:
overlay rwm
rwm-map attribute       userpassword    msSFU30Password
rwm-map attribute       memberuid       msSFU30MemberUid
rwm-map attribute       gidnumber       msSFU30GidNumber
rwm-map attribute       gecos           name
rwm-map attribute       uid             msSFU30Name
rwm-map attribute       uidnumber       msSFU30UidNumber
rwm-map attribute       homedirectory   msSFU30HomeDirectory
rwm-map attribute       loginshell      msSFU30LoginShell
rwm-map objectclass     posixGroup      group
rwm-map objectclass     posixAccount    user
</pre>
<p>Walking through this config file line-by-line, not the following (keyed by line number):</p>
<p><strong>3.</strong> Make the file owned by user &#8220;root&#8221;/group &#8220;openldap&#8221; without &#8220;other&#8221; read permissions (assuming you&#8217;ll be running OpenLDAP as user &#8220;openldap&#8221; in group &#8220;openldap&#8221; &#8211; adapt as necessary for your site), e.g.:</p>
<pre class="brush: plain; light: true; title: ; notranslate">
-r--r----- 1 root openldap 1569 2010-08-04 14:51 slapd.conf
</pre>
<p><strong>9.</strong> We need to add some schema information for the older Microsoft Services for Unix extensions; they&#8217;re available in <a href="https://gist.github.com/766424">a GitHub Gist</a>.</p>
<p><strong>30-33.</strong> Configure the connection to the Active Directory servers.  Note in particular that the database type is &#8220;ldap&#8221; meaning that another LDAP server (AD) is used as the data source, via a proxy.  Line 33 is a user in Active Directory to which you bind to the back-end servers as.</p>
<p><strong>37-47.</strong> Map the SFU attributes to their RFC 2307 equivalents.  Note that you will need to populate msSFU30MemberUid manually &#8211; <a href="http://sdgeex.blogspot.com/2009/01/opensolaris-200811-windows-2003-server.html">here&#8217;s one way to do it</a>.</p>
<p>Other than that, perhaps an <a href="https://gist.github.com/767919">init script</a> and a file for <a href="https://gist.github.com/767924">/etc/default/slapd</a> (both lightly adapted from the stock Ubuntu &#8220;slapd&#8221; .deb), and you should be good to go.</p>
<p>References: <a href="http://eldapo.blogspot.com/2007/08/openldap-as-pass-through-proxy.html">eldapo: openldap as a pass-through proxy</a></p>
]]></content:encoded>
			<wfw:commentRss>http://andyleonard.com/2011/01/06/using-an-openldap-proxy-to-work-around-solarisactive-directory-issues/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Fishworks&#8217; LDAP Schema Definition</title>
		<link>http://andyleonard.com/2008/11/18/fishworks-ldap-schema-definition/</link>
		<comments>http://andyleonard.com/2008/11/18/fishworks-ldap-schema-definition/#comments</comments>
		<pubDate>Wed, 19 Nov 2008 00:02:44 +0000</pubDate>
		<dc:creator>Andy</dc:creator>
				<category><![CDATA[storage]]></category>
		<category><![CDATA[fishworks]]></category>
		<category><![CDATA[ldap]]></category>
		<category><![CDATA[sun]]></category>
		<category><![CDATA[zfs]]></category>

		<guid isPermaLink="false">http://andyleonard.com/?p=164</guid>
		<description><![CDATA[Quick notes on configuring LDAP in Fishworks, gleaned from my experience working with the VMware simulator: As I noted in my &#8220;quick walk&#8221; post&#8216;s comments, I had difficulty getting LDAP working initially on my corporate Active Directory network. The crux for me turned out to be getting the LDAP Schema Definitions correct. Here are the [...]]]></description>
			<content:encoded><![CDATA[<p>Quick notes on configuring LDAP in Fishworks, gleaned from my experience working with the VMware simulator:</p>
<p>As I noted in my <a href="/2008/11/12/a-quick-walk-through-fishworks-configuration/">&#8220;quick walk&#8221; post</a>&#8216;s comments, I had difficulty getting LDAP working initially on my corporate Active Directory network.  The crux for me turned out to be getting the LDAP Schema Definitions correct.  Here are the settings that worked correctly for me, authenticating against an AD instance with the schema extended by Microsoft&#8217;s Services for Unix add-on (other LDAP schemata will, of course, need different mappings):</p>
<p><strong>USERS</strong><br />
<strong>Search descriptor:</strong> Don&#8217;t leave this blank &#8211; according to the Fishworks documentation this &#8220;sets the LDAP search descriptor, attribute mappings and object class mappings for users and groups. By default, the search descriptor for users is ou=people,dc=example,dc=com, and for groups is ou=group,dc=example,dc=com&#8221; &#8211; so what you enter will be site-specific.</p>
<p><strong>Attribute mappings:</strong></p>
<ul>
<li>uid=msSFU30Name</li>
<li>uidNumber=msSFU30UidNumber</li>
<li>gidNumber=msSFU30GidNumber</li>
</ul>
<p><strong>Object class mappings:</strong></p>
<ul>
<li>posixAccount=User</li>
</ul>
<p><strong>GROUPS</strong><br />
<strong>Search descriptor:</strong> Again, don&#8217;t leave this blank &#8211; enter the appropriate value for your site.</p>
<p><strong>Attribute mappings:</strong></p>
<ul>
<li>gidNumber=msSFU30GidNumber</li>
<li>uniqueMember=msSFU30PosixMember</li>
</ul>
<p><strong>Object class mappings:</strong></p>
<ul>
<li>posixGroup=group</li>
</ul>
<p>How did I know that the schema definition mappings were the problem?  The logs gave it away: Maintenance -> Logs -> System, where I saw messages similar to the following: &#8220;libsldap: Status: 0 Mesg: Unable to set value: schema map already existed for &#8216;User&#8217;.&#8221;</p>
<p>How did I know that I had the schema definitions working?  Share settings that I had created using numeric UIDs and GIDs automatically became mapped to the correct user and group names.</p>
<p>I&#8217;ll update this post if I find additional configuration that may be necessary.</p>
]]></content:encoded>
			<wfw:commentRss>http://andyleonard.com/2008/11/18/fishworks-ldap-schema-definition/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

