<?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>OSX Hosting &#187; directory</title>
	<atom:link href="http://osxhosting.com/osxhosting/tag/directory/feed" rel="self" type="application/rss+xml" />
	<link>http://osxhosting.com/osxhosting</link>
	<description>Anything to do with hosting from mac OS X servers!</description>
	<lastBuildDate>Fri, 13 Aug 2010 17:21:38 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Integrating OSX Clients with an OpenLDAP Directory</title>
		<link>http://osxhosting.com/osxhosting/integrating-osx-clients-with-an-openldap-directory#utm_source=feed&amp;utm_medium=feed&amp;utm_campaign=feed</link>
		<comments>http://osxhosting.com/osxhosting/integrating-osx-clients-with-an-openldap-directory#comments</comments>
		<pubDate>Tue, 19 Feb 2008 21:50:52 +0000</pubDate>
		<dc:creator>montanaflynn</dc:creator>
				<category><![CDATA[Hosting]]></category>
		<category><![CDATA[OSX]]></category>
		<category><![CDATA[Xserve]]></category>
		<category><![CDATA[ACL]]></category>
		<category><![CDATA[apple.schema]]></category>
		<category><![CDATA[directory]]></category>
		<category><![CDATA[LDAPv3]]></category>
		<category><![CDATA[OpenLDAP]]></category>
		<category><![CDATA[OSX Clients]]></category>
		<category><![CDATA[Servers]]></category>

		<guid isPermaLink="false">http://macosxhosting.wordpress.com/?p=21</guid>
		<description><![CDATA[This is an article by Adam Shand  you can view the original article at http://www.spack.org/wiki/AppleOsxIntegrationWithOpenLdap. Where I work is primarily a RedhatLinux shop, with a smattering of MicrosoftWindows, SgiIrix and Apple Osx. While we will remain primarily a Linux house for cost reasons, Apple Osx is becoming an increasingly important part of our corporate workflow [...]]]></description>
			<content:encoded><![CDATA[<p class="line862">This is an article by <b>Adam Shand</b>  you can view the original article at <a href="http://www.spack.org/wiki/AppleOsxIntegrationWithOpenLdap" rel="nofollow">http://www.spack.org/wiki/AppleOsxIntegrationWithOpenLdap</a>.</p>
<p class="line862">Where I work is primarily a <a href="http://www.spack.org/wiki/RedhatLinux">RedhatLinux</a> shop, with a smattering of <a href="http://www.spack.org/wiki/MicrosoftWindows">MicrosoftWindows</a>, <a href="http://www.spack.org/wiki/SgiIrix">SgiIrix</a> and <a href="http://www.spack.org/wiki/AppleOsx">Apple Osx</a>.  While we will remain primarily a Linux house for cost reasons, <a href="http://www.spack.org/wiki/AppleOsx">Apple Osx</a> is becoming an increasingly important part of our corporate workflow due to our dependence on quicktime, the increasing number of applications available and the increasing preference of both our artists and IT staff. <span class="anchor"></span><span class="anchor"></span></p>
<p>Because we already had a huge Linux infrastructure built I didn&#8217;t want to mess about with Netinfo or using an OSX Server as a bridge between our Macs and our <a href="http://www.spack.org/wiki/LdapAuthentication">LdapAuthentication</a> infrastructure. I wanted our Mac&#8217;s to play nicely in our existing world, this meant that authentication, naming (users, groups etc) and automount all had to work with as little fuss or differences as possible.<span id="more-23"></span></p>
<h2>Assumptions</h2>
<p><span class="anchor"></span><span class="anchor"></span></p>
<p class="line874">To keep this howto as simple as possible I had to make some assumptions: <span class="anchor"></span><span class="anchor"></span></p>
<ul>
<li>That you are moderately familiar with LDAP or willing to struggle through the relatively steep learning curve before tackling this. <span class="anchor"></span></li>
<li>That you have admin/root privileges on at least one Mac and one Linux server. <span class="anchor"></span></li>
<li>You are capable of installing and configuring complex packages. <span class="anchor"></span></li>
<li>
<p class="line862">That you are using <a href="http://www.spack.org/wiki/AppleOsx">AppleOsx</a> 10.3/Panther as your client (I&#8217;m using 10.3.4). <span class="anchor"></span></p>
</li>
<li>
<p class="line862">That you are using running <a href="http://www.spack.org/wiki/OpenLdap" class="nonexistent">OpenLdap</a> 2.0 on a Linux server (I&#8217;m using <a href="http://www.spack.org/wiki/OpenLdap" class="nonexistent">OpenLdap</a> 2.0.21 on a <a href="http://www.spack.org/wiki/RedhatLinux">RedhatLinux</a> 7.3 box).  <span class="anchor"></span><span class="anchor"></span></p>
</li>
</ul>
<p class="line874">You may or may not have good luck following these directions with older or newer versions. <span class="anchor"></span><span class="anchor"></span></p>
<p class="line867">&nbsp;</p>
<h2>Setting Up the OpenLDAP Server</h2>
<p><span class="anchor"></span><span class="anchor"></span></p>
<p class="line862">There are plenty of articles out there on setting up an <a href="http://www.spack.org/wiki/OpenLdap" class="nonexistent">OpenLdap</a> server, so I won&#8217;t go into that here.  If you haven&#8217;t done this before the best article I&#8217;ve found is the Mandrake Secure <a href="http://www.mandrakesecure.net/en/docs/ldap-auth2.php" class="http">article</a> (a slightly more evolved version is available on the <a href="http://linsec.ca/bin/view/Main/OpenLDAPAuth" class="http">authors wiki</a>). If you are unfamiliar with LDAP and still want to tackle this probably the single most useful thing you can do is install a good <a href="http://www.spack.org/wiki/LdapClient">LdapClient</a> and start browsing around to get a feel of how it works.  I recommend <a href="http://phpldapadmin.sourceforge.net/" class="http">PHP LDAP Admin</a> as by far the best client I&#8217;ve used. <span class="anchor"></span><span class="anchor"></span></p>
<p class="line862">OSX can access normal user and group data so long as you configure it correctly. The hard part, and the almost completely undocumented part, is getting OSX automount to work. OSX comes with two options for automounting directories, AMD and the Apple proprietary automount. I only discuss the automount option because all our attempts at configuring AMD resulted in a horrible unstable mess. <sup><a href="http://www.spack.org/wiki/AppleOsxIntegrationWithOpenLdap#fndef-bf7f6a262ef5a8b9dbfc87bd65b0b254ca2cef91-0" id="fnref-bf7f6a262ef5a8b9dbfc87bd65b0b254ca2cef91-0">1</a></sup> <span class="anchor"></span><span class="anchor"></span></p>
<ol>
<li>
<p class="line862">Setup and configure an <a href="http://www.spack.org/wiki/OpenLdap" class="nonexistent">OpenLdap</a> server. <span class="anchor"></span></p>
</li>
<li>If possible make sure that you can authenticate to it from a Linux box and that everything works as expected before you continue any further. <span class="anchor"></span></li>
<li>
<p class="line862">Add the <tt>apple.schema</tt><sup><a href="http://www.spack.org/wiki/AppleOsxIntegrationWithOpenLdap#fndef-62960ba496af69ee04b7f16c00307fbf88db9a0e-1" id="fnref-62960ba496af69ee04b7f16c00307fbf88db9a0e-1">2</a></sup> to you LDAP directory: <span class="anchor"></span></p>
<ol>
<li>
<p class="line862">Download the <a href="http://www.spack.org/wiki/AppleOsxIntegrationWithOpenLdap?action=AttachFile&amp;do=get&amp;target=apple.schema" class="attachment" title="apple.schema">apple.schema</a> file. <span class="anchor"></span></p>
</li>
<li>
<p class="line862">Copy it into your <tt>schema</tt> directory (normally <tt>/etc/openldap/schema</tt>). <span class="anchor"></span></p>
</li>
<li>
<p class="line862">Because of the way that Apple wrote their automount schema definition, adding it requires that you disable schema checking in your <a href="http://www.spack.org/wiki/OpenLdap" class="nonexistent">OpenLdap</a> configuration.  To turn off schema checking you must add this line to your <tt>slapd.conf</tt>: <span class="anchor"></span></p>
<pre>schemacheck off
<span class="anchor"></span></pre>
<p><span class="anchor"></span></li>
</ol>
</li>
<li>
<p class="line862">Restart <a href="http://www.spack.org/wiki/OpenLdap" class="nonexistent">OpenLdap</a> for the configuration changes to take effect, watch the logs carefully to make sure that the new schema file was not rejected. <span class="anchor"></span></p>
</li>
<li>
<p class="line862">If you have already populated your LDAP directory make sure you have top level containers called <i>&#8220;ou=people&#8221;</i>, <i>&#8220;ou=group&#8221;</i> and <i>&#8220;ou=mounts&#8221;</i>.  If you haven&#8217;t populated it I&#8217;ve included a <a href="http://www.spack.org/wiki/AppleOsxIntegrationWithOpenLdap?action=AttachFile&amp;do=get&amp;target=osx-sample-spack.org.ldif" class="attachment" title="osx-sample-spack.org.ldif">sample LDIF</a> file which you can use to get started. <span class="anchor"></span></p>
</li>
<li>Using the sample LDIF as an example, add enough valid user, group and mount entries for you test your configuration. <span class="anchor"></span><span class="anchor"></span></li>
</ol>
<p class="line874">Note: I have not yet followed the above steps to make sure they are correct and that I haven&#8217;t left anything out. If you encounter problems please let me know. <span class="anchor"></span><span class="anchor"></span></p>
<p class="line867">&nbsp;</p>
<h2>Configuring the Apple OSX Client</h2>
<p><span class="anchor"></span><span class="anchor"></span></p>
<p class="line874">These instructions were written for OSX 10.3 (Panther) however they are still approximately correct for anything from 10.2 to 10.4. Once you understand how it works just follow your nose and it should be fairly straight forward. <span class="anchor"></span><span class="anchor"></span></p>
<ol>
<li>Open Directory Access (/Applications/Utilities) <span class="anchor"></span></li>
<li>
<p class="line862">Enable the <tt>LDAPv3 Plugin</tt> <span class="anchor"></span></p>
</li>
<li>
<p class="line862">Select the LDAPv3 Plugin and click <i>&#8220;Configure&#8221;</i> <span class="anchor"></span></p>
</li>
<li>Click &#8220;New&#8221; <span class="anchor"></span>
<ol>
<li>Enable: tick <span class="anchor"></span></li>
<li>
<p class="line862">Server: <tt>ldap01.spack.org</tt> <span class="anchor"></span></p>
</li>
<li>
<p class="line862">LDAP Mappings: <tt>RFC 2307 (Unix)</tt> <span class="anchor"></span></p>
</li>
<li>
<p class="line862">Search Base Suffix: <tt>dc=spack,dc=org</tt> <span class="anchor"></span></p>
</li>
<li>SSL: unticked <span class="anchor"></span></li>
</ol>
</li>
<li>
<p class="line862">Click <i>&#8220;Edit&#8221;</i> <span class="anchor"></span></p>
<ol>
<li>
<p class="line891"><b>[optional]</b> Open/Close times out in: <tt>10</tt> <span class="anchor"></span></p>
</li>
<li>
<p class="line891"><b>[optional]</b> Connection times out in: <tt>10</tt> <span class="anchor"></span></p>
</li>
<li>Use authentication while connecting: unticked <span class="anchor"></span></li>
<li>Encrypt using SSL: unticked <span class="anchor"></span></li>
<li>Use custom port: unticked <span class="anchor"></span></li>
</ol>
</li>
<li>
<p class="line862">Now Click on <i>&#8220;Search &amp; Mappings&#8221;</i> <sup><a href="http://www.spack.org/wiki/AppleOsxIntegrationWithOpenLdap#fndef-200bb2e0d2c317d6e0788c5c0f065692c5e42465-2" id="fnref-200bb2e0d2c317d6e0788c5c0f065692c5e42465-2">3</a></sup> <span class="anchor"></span></p>
<ol>
<li>
<p class="line891"><b>[optional]</b> Click on  <i>&#8220;Users&#8221;</i>  <span class="anchor"></span></p>
<ol>
<li>
<p class="line862">In the <i>&#8220;Search base&#8221;</i> box enter <tt>ou=people,dc=spack,dc=org</tt> <span class="anchor"></span></p>
</li>
<li>
<p class="line862">Tick <i>&#8220;first level only&#8221;</i> <span class="anchor"></span></p>
</li>
</ol>
</li>
<li>
<p class="line891"><b>[optional]</b> Click on  <i>&#8220;Groups&#8221;</i>  <span class="anchor"></span></p>
<ol>
<li>
<p class="line862">In the <i>&#8220;Search base&#8221;</i> box enter <tt>ou=group,dc=spack,dc=org</tt> <span class="anchor"></span></p>
</li>
<li>
<p class="line862">Tick <i>&#8220;first level only&#8221;</i> <span class="anchor"></span></p>
</li>
</ol>
</li>
<li>
<p class="line891"><b>[optional]</b> Click on  <i>&#8220;Mounts&#8221;</i>  <span class="anchor"></span></p>
<ol>
<li>
<p class="line862">In the <i>&#8220;Search base&#8221;</i> box enter <tt>ou=mounts,dc=spack,dc=org</tt> <span class="anchor"></span></p>
</li>
<li>
<p class="line862">Tick <i>&#8220;first level only&#8221;</i> <span class="anchor"></span></p>
</li>
</ol>
</li>
</ol>
</li>
<li>
<p class="line862">Save back out to the main <i>&#8220;Directory Access&#8221;</i> screen. <span class="anchor"></span></p>
</li>
<li>If you&#8217;ve made any mistakes now is the time to catch them, use the techniques in the below testing section to verify that you can see users, groups and mounts. If you find any problems you should fix them before you continue or risk an unusable system. <span class="anchor"></span></li>
<li>
<p class="line862">Click on the <i>&#8220;Authentication&#8221;</i> tab. <span class="anchor"></span></p>
<ol>
<li>
<p class="line862">Select <i>&#8220;Custom&#8221;</i> from the <i>&#8220;Search:&#8221;</i> drop down menu. <span class="anchor"></span></p>
</li>
<li>
<p class="line862">Click <i>&#8220;Add&#8221;</i> at the bottom of the screen. <span class="anchor"></span></p>
</li>
<li>
<p class="line862">Select the <i>&#8220;LDAPv3 &#8230;&#8221;</i> option from the <i>&#8220;Available Directories&#8221;</i> screen. <span class="anchor"></span></p>
</li>
</ol>
</li>
<li>
<p class="line862">Exit <i>&#8220;Directory Access&#8221;</i> and save all changes. <span class="anchor"></span><span class="anchor"></span></p>
</li>
</ol>
<p class="line862">Depending on the exact order you exit <i>&#8220;Directory Access&#8221;</i>, you may need to reboot for the changes to become live. It can be a bit quirky and I haven&#8217;t figured out exactly which things make a difference yet. <span class="anchor"></span><span class="anchor"></span></p>
<p class="line867">&nbsp;</p>
<h2>Testing</h2>
<p><span class="anchor"></span><span class="anchor"></span></p>
<p class="line862">The best program to test your new directory service with is an <a href="http://www.spack.org/wiki/AppleOsx">AppleOsx</a> tool called dscl for &#8220;Domain Service command line utility&#8221;.<sup><a href="http://www.spack.org/wiki/AppleOsxIntegrationWithOpenLdap#fndef-6747e6cd2c00fdfe0d224b4be4c962e4440bb55d-3" id="fnref-6747e6cd2c00fdfe0d224b4be4c962e4440bb55d-3">4</a></sup> <span class="anchor"></span><span class="anchor"></span></p>
<p class="line862">You can use dscl to either search all of the available sources for information (via the <tt>/Search/Users</tt> path) or you can manually specify which particular directory you wish to query (eg.<tt>/LDAPv3/ldap.spack.org/Users</tt>.  The difference between <tt>Users</tt> and <tt>People</tt> seems to be based on whether the data is keyed on username (uid) or full name (cn/gecos). <span class="anchor"></span><span class="anchor"></span></p>
<p class="line874">Hopefully some examples will make it clear: <span class="anchor"></span><span class="anchor"></span></p>
<p class="line867"><span class="anchor"></span></p>
<pre><span class="anchor"></span>## to list only LDAP users
<span class="anchor"></span># dscl localhost list /LDAPv3/ldap.spack.org/Users
<span class="anchor"></span>adam
<span class="anchor"></span>ben
<span class="anchor"></span>bill
<span class="anchor"></span>paul
<span class="anchor"></span>...&lt;snip&gt;...
<span class="anchor"></span>
<span class="anchor"></span>## to list all available users (local, LDAP, NIS, whatever)
<span class="anchor"></span># dscl localhost list /Search/Users
<span class="anchor"></span>adam
<span class="anchor"></span>ben
<span class="anchor"></span>bill
<span class="anchor"></span>paul
<span class="anchor"></span>...&lt;snip&gt;...
<span class="anchor"></span>
<span class="anchor"></span># dscl localhost list /LDAPv3/ldap.spack.org/People
<span class="anchor"></span>Adam Shand
<span class="anchor"></span>Ben Foo
<span class="anchor"></span>Bill Bar
<span class="anchor"></span>Paul Gaz
<span class="anchor"></span>...&lt;snip&gt;...
<span class="anchor"></span>
<span class="anchor"></span># dscl localhost read /LDAPv3/ldap.spack.org/Groups/staff
<span class="anchor"></span>cn: staff
<span class="anchor"></span>gidNumber: 10
<span class="anchor"></span>memberUid: adam ben bill paul
<span class="anchor"></span>objectClass: posixGroup top
<span class="anchor"></span>AppleMetaNodeLocation: /LDAPv3/ldap.spack.org
<span class="anchor"></span>GroupMembership: adam ben bill paul
<span class="anchor"></span>Member: adam ben bill paul
<span class="anchor"></span>PasswordPlus: ********
<span class="anchor"></span>PrimaryGroupID: 10
<span class="anchor"></span>RecordName: staff
<span class="anchor"></span>
<span class="anchor"></span># dscl localhost read /Search/Users/adam
<span class="anchor"></span>cn: Adam Shand
<span class="anchor"></span>gecos: Adam Shand
<span class="anchor"></span>gidNumber: 105
<span class="anchor"></span>givenName: Adam
<span class="anchor"></span>homeDirectory: /home/adam
<span class="anchor"></span>loginShell: /bin/bash
<span class="anchor"></span>objectClass: top person organizationalPerson inetOrgPerson account posixAccount shadowAccount inetLocalMailRecipient kerberosSecurityObject
<span class="anchor"></span>sn: Shand
<span class="anchor"></span>uid: adam
<span class="anchor"></span>uidNumber: 364
<span class="anchor"></span>AppleMetaNodeLocation: /LDAPv3/ldap.spack.org
<span class="anchor"></span>NFSHomeDirectory: /home/adam
<span class="anchor"></span>PasswordPlus: ********
<span class="anchor"></span>PrimaryGroupID: 101
<span class="anchor"></span>RealName: Adam Shand
<span class="anchor"></span>RecordName: adam
<span class="anchor"></span>UniqueID: 364
<span class="anchor"></span>UserShell: /bin/bash
<span class="anchor"></span>
<span class="anchor"></span># dscl localhost read /LDAPv3/ldap.spack.org/Mounts/netapp\\:\\/vol\\/vol0\\/home
<span class="anchor"></span>cn: rhun:/vol/vol0/home
<span class="anchor"></span>mountDirectory: /home
<span class="anchor"></span>mountOption: nodev intr hard nfsv3 resvport wsize=8192 rsize=8192
<span class="anchor"></span>mountType: nfs
<span class="anchor"></span>objectClass: mount
<span class="anchor"></span>AppleMetaNodeLocation: /LDAPv3/ldap.spack.org
<span class="anchor"></span>PasswordPlus: ********
<span class="anchor"></span>RecordName: rhun:/vol/vol0/home
<span class="anchor"></span>VFSLinkDir: /home
<span class="anchor"></span>VFSOpts: nodev intr hard nfsv3 resvport wsize=8192 rsize=8192
<span class="anchor"></span>VFSType: nfs
<span class="anchor"></span></pre>
<p><span class="anchor"></span><span class="anchor"></span></p>
<p class="line874">If the above works as expected then you should be able to: <span class="anchor"></span><span class="anchor"></span></p>
<ul>
<li>Log into your OSX box with a username and password that only exists in LDAP.  <span class="anchor"></span></li>
<li>
<p class="line862">Finger users that only exist in LDAP (e.g. <tt>finger -m &lt;username&gt;</tt>). <span class="anchor"></span></p>
</li>
<li>
<p class="line862">Change directories into a network mount location and have it automatically mounted (e.g.. <tt>cd /home/adam</tt>).  This works for home directories as well. <span class="anchor"></span></p>
</li>
<li>
<p class="line862">Do an <tt>ls -l</tt> on a file owned by an LDAP user and group and have the uid/gid resolve into proper names. <span class="anchor"></span><span class="anchor"></span></p>
</li>
</ul>
<p class="line867">&nbsp;</p>
<h2>Trouble Shooting</h2>
<p><span class="anchor"></span><span class="anchor"></span></p>
<dl>
<dt>Debugging OSX </dt>
<dd>
<p class="line862">I heartily recommend that you turn the debugging up as high as possible. The best way to do this on the client side is to add a line like this to your <tt>/etc/syslog.conf</tt> and then restart syslog <sup><a href="http://www.spack.org/wiki/AppleOsxIntegrationWithOpenLdap#fndef-ad15f399737a0b4b38a2df74de8f2ecb141d5ed5-4" id="fnref-ad15f399737a0b4b38a2df74de8f2ecb141d5ed5-4">5</a></sup>: <span class="anchor"></span><span class="anchor"></span><span class="anchor"></span></p>
<pre>*.*                                /var/log/debug.log
<span class="anchor"></span></pre>
<p><span class="anchor"></span><span class="anchor"></span></p>
</dd>
<dt>Debugging LDAP </dt>
<dd>
<p class="line862">If you are having trouble understanding why <a href="http://www.spack.org/wiki/OpenLdap" class="nonexistent">OpenLdap</a> is behaving the way it is, or why client queries don&#8217;t seem to be work as you expect, it&#8217;s very useful to fire it up in debug mode where it prints everything it&#8217;s doing to the screen. To do this stop your LDAP service and run <tt>slapd -d 255</tt>. <span class="anchor"></span><span class="anchor"></span></p>
</dd>
<dt>LDAP ACLs </dt>
<dd>Access control lists in LDAP are powerful, complicated and confusing. I recommend you don&#8217;t configure any ACL&#8217;s until after you have everything tested and working. After that enabled them one at a time and test copiously to make sure you haven&#8217;t introduced unexpected problems. <span class="anchor"></span><span class="anchor"></span></dd>
<dt>NFS Locks </dt>
<dd>
<p class="line862">If you NFS mount your users home directories you may find that your users experience random application hangs, especially applications which use the Addressbook.app. The way to resolve this is disable NFS locking. You can do this either by downloading Marcel Bresink&#8217;s [NFS Manager] or by editing <tt>/etc/hostconfig</tt> and changing the NFS locking line to look like <tt>NFSLOCKS=-NO-</tt> (you have to reboot for the change to take effect). <span class="anchor"></span><span class="anchor"></span></p>
</dd>
</dl>
<p class="line867">&nbsp;</p>
<h2>Further Thoughts</h2>
<p><span class="anchor"></span><span class="anchor"></span></p>
<dl>
<dt>Automount Quirks </dt>
<dd>The Apple automount doesn&#8217;t support a few standard automount features, we&#8217;ve worked around them in various ways: <span class="anchor"></span><span class="anchor"></span></p>
<ul>
<li>
<p class="line862">The special directory <tt>/net</tt> (or <tt>/hosts</tt> in <a href="http://www.spack.org/wiki/SgiIrix">SgiIrix</a> land) allows you to mount any available share by simply changing into a <tt>/net/&lt;hostname&gt;/&lt;share&gt;</tt> style directory.  While not ideal the best solution I&#8217;ve found is to reshare <tt>/net</tt> from an Linux server via Samba.  OSX clients can then get similar functionality by manually mounting the Samba share (eg. <tt>Command-K</tt> and mount <tt>smb://samba.spack.org/net</tt>). <span class="anchor"></span></p>
</li>
<li>
<p class="line891"><i>Actually, you can mkdir /net and add &#8220;-m /net -host&#8221; to the second automount line in /System/Library/<a href="http://www.spack.org/wiki/StartupItems" class="nonexistent">StartupItems</a>/NFS to get the /net behavior, or better yet, copy that item to /Library/<a href="http://www.spack.org/wiki/StartupItems" class="nonexistent">StartupItems</a> before modifying it so your changes don&#8217;t get overwritten. &#8212; Anonymous Comment</i> &#8212; I will test this and update &#8212; <a href="http://www.spack.org/wiki/AdamShand">AdamShand</a> <span class="anchor"></span></p>
<ul>
<li>* The above doesn&#8217;t seem to work on Intel Macs, anyone got any ideas?   <span class="anchor"></span>
<ul>
<li>Colin Aspin (caspin at mac.com) <span class="anchor"></span></li>
</ul>
</li>
</ul>
</li>
<li>
<p class="line862">Wildcard mapping using the <tt>*</tt> and <tt>&amp;</tt> characters is typically used by autofs for home directories. The work around is to simply mount all of your home directories rather then rely on the wildcard mapping to mount just the required user home directories. This works fine, but it means that an accidental <tt>ls /home</tt> can be quite slow. <span class="anchor"></span></p>
</li>
<li>
<p class="line862">When getting automount maps from LDAP, automount doesn&#8217;t seem to be able to create required parent directories (so if you are automounting <tt>/foo/bar</tt>, you must make sure that the<tt>/foo</tt> directory exists when automount starts). <span class="anchor"></span></p>
</li>
<li>Automount keys mounts off of the source name instead of the destination name. This is silly since you sometimes have legitimate reasons for having the same share mounted at different points in your filesystem (but by definition can&#8217;t mount two shares at the same point in your filesystem). <span class="anchor"></span><span class="anchor"></span></li>
</ul>
</dd>
<dt>Optimizing Searches </dt>
<dd>
<p class="line862">You can make the searches for user, group and mount data a bit more efficient by telling <i>&#8220;Directory Access&#8221;</i> exactly where it can find the information it&#8217;s looking for (as opposed to the default of it searching from the top of the tree down for matching entries): <span class="anchor"></span><span class="anchor"></span></p>
</dd>
<dt>Updating Automount </dt>
<dd>
<p class="line862">Sadly automount isn&#8217;t capable of automatically rescanning the LDAP server for changes, if you make changes to the automount data in LDAP you must either reboot (ick!) or <tt>kill -HUP</tt> the automount process (there are two automount processes, you want the one with all the &#8220;-m&#8221; options and the one without the &#8220;-nsl&#8221;<sup><a href="http://www.spack.org/wiki/AppleOsxIntegrationWithOpenLdap#fndef-ae95d90a9bd14826e7720c58b86ffde4f2eb8e90-5" id="fnref-ae95d90a9bd14826e7720c58b86ffde4f2eb8e90-5">6</a></sup>).   <span class="anchor"></span><span class="anchor"></span></p>
</dd>
<dt>NFS Mount Options </dt>
<dd>
<p class="line862">OSX supports the usual NFS mount options but has two unusual ones. The first is &#8220;resvport&#8221;, this option is required for OSX to be able to mount shares from many NFS servers, as a general rule I recommend you always use it. The second is the &#8220;net&#8221; option, for the purposes of making an OSX box behave like a normal Unix box I recommend that you stay far away from it. If you want to learn more then Marcel Bresink&#8217;s <a href="http://www.bresink.de/osx/nis.html#NetNote" class="http">excellent article</a> is the best place to learn more. <span class="anchor"></span><span class="anchor"></span></p>
</dd>
<dt>Configure Slaves </dt>
<dd>Before you bring your new system into production I strongly recommend that you configure at least one LDAP slave. Because your new LDAP infrastructure will be responsible for all your authentication, naming and automounting needs, you really want the redundancy provided by a slave server. <span class="anchor"></span><span class="anchor"></span></dd>
<dt>Providing Redundancy with DNS </dt>
<dd>I name my master server ldap0.spack.org and my slaves ldap1.spack.org and ldap2.spack.org. I then create a DNS round robin called ldap.spack.org which points at all three addresses. Once you have this setup you should point your clients at the round robin alias ldap.spack.org. Now if one of your LDAP servers fails you can stop clients from talking to it by simply removing the failed server from the DNS round robin. <span class="anchor"></span><span class="anchor"></span></dd>
<dt>Better Redundancy </dt>
<dd>
<p class="line862">Better then a DNS round robin would be to provide redundancy with some sort of layer 7 aware proxy. I don&#8217;t know if any of the commercial switch providers offer LDAP aware load balancing switches. There may also be <a href="http://www.spack.org/wiki/OpenSource">OpenSource</a> alternatives that I&#8217;m not aware of.  <span class="anchor"></span><span class="anchor"></span></p>
</dd>
<dt>Linux AutoFS </dt>
<dd>
<p class="line862">The Linux <a href="http://www.spack.org/wiki/AutoMount">AutoMount</a> daemon can also store it&#8217;s entries in the <i>&#8220;ou=mounts&#8221;</i> container of your LDAP directory. There does not seem to be any problem with the Linux mount entries coexisting with the OSX mount entries in the same ou. <span class="anchor"></span><span class="anchor"></span></p>
</dd>
<dt>Automation </dt>
<dd>
<p class="line862">I have some <a href="http://www.spack.org/wiki/PerlLanguage">PerlLanguage</a> scripts which will mirror the contents of the Linux <i>&#8220;auto.master&#8221;</i> and &#8216;&#8221;"auto_*&#8221;<i> files into OSX automount format on an LDAP directory.  If get permission, I will post them here. <span class="anchor"></span><span class="anchor"></span></i></p>
</dd>
<dt>SSL </dt>
<dd>Before deploying this you should make sure that all of your clients and servers are configured to talk to LDAP over SSL encrypted links. Eamon Caddigan has kindly written in with what he did to make it work: <span class="anchor"></span><span class="anchor"></span></p>
<ul>
<li>
<p class="line891">Once unencrypted authentication was working, I followed <a href="http://linsec.ca/bin/view/Main/OpenLDAPAuth#Using_SSL_TLS_with_OpenLDAP" class="http">these instructions</a> for configuring the server to use SSL (part of the expanded Mandrake Secure guide already linked to your site). After restarting slapd, simply tick the &#8220;Encrypt using SSL&#8221; checkbox (&#8220;Use custom port&#8221; is left unticked because TLS uses the standard port) in the Directory Access app on the OS X client. Unless I&#8217;m missing something (very possible), that&#8217;s all there is to it.<i> <span class="anchor"></span><span class="anchor"></span></i></p>
</li>
</ul>
</dd>
</dl>
<p class="line867">&nbsp;</p>
<h2>Missing Pieces</h2>
<p><span class="anchor"></span><span class="anchor"></span></p>
<dl>
<dt>Remove Mapping for Password </dt>
<dd>In the attribute mapping part, if you remove the password map then OSX will authenticate the user by binding to the LDAP server rather then doing a password comparision. This means your encryption method becomes transparent to your clients and you can get away from crypt. Untested. <span class="anchor"></span><span class="anchor"></span></dd>
<dt>Use DHCP Supplied LDAP Server </dt>
<dd>
<p class="line862">OSX supports getting it&#8217;s LDAP information from DNS, I have not successfully made this work yet and am a little confused about how you are supposed to configure it this way since &#8220;Directory Access&#8221;<i> does it&#8217;s pathing seems to require that you know the name of the LDAP server the client will use.   Here&#8217;s a snippet from a <tt>/etc/dhcpd.conf</tt>, though I still wonder how to specify two LDAP servers: <span class="anchor"></span><span class="anchor"></span><span class="anchor"></span></i></p>
<pre><i>option ldap-server code 95 = text;
<span class="anchor"></span>
<span class="anchor"></span>subnet 192.168.1.0 netmask 255.255.255.0 {
<span class="anchor"></span>  range 192.168.1.200 192.168.1.250;
<span class="anchor"></span>  option routers 192.168.1.1;
<span class="anchor"></span>  option domain-name "spack.org";
<span class="anchor"></span>  option domain-name-servers 192.168.1.2,192.168.1.3;
<span class="anchor"></span>  option ldap-server "ldap://192.168.1.2/dc=spack,dc=org";
<span class="anchor"></span>}
<span class="anchor"></span></i></pre>
<p><span class="anchor"></span><span class="anchor"></span></p>
</dd>
<dt>Write Mappings to Server </dt>
<dd>
<p class="line862">You can write your custom mappings to the server so that you don&#8217;t have to manually configure each client. I have managed to write the mappings to my server but have been unable to make the client pay any attention to them. There is some more information in this <a href="http://www.msec.net/advisories/dhcp_vuln.html" class="http">security advisory</a>.</p>
</dd>
</dl>
]]></content:encoded>
			<wfw:commentRss>http://osxhosting.com/osxhosting/integrating-osx-clients-with-an-openldap-directory/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
