<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>Ryan Lane's Blog » LDAP</title>
	
	<link>http://ryandlane.com/blog</link>
	<description />
	<lastBuildDate>Thu, 29 Jul 2010 13:56:34 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/RyanLanesBlog_ldap" /><feedburner:info uri="ryanlanesblog_ldap" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://superfeedr.com/hubbub" /><item>
		<title>LdapAuthentication 1.2c released</title>
		<link>http://feedproxy.google.com/~r/RyanLanesBlog_ldap/~3/5QHMGasV2Z0/</link>
		<comments>http://ryandlane.com/blog/2010/06/24/ldapauthentication-1-2c-released/#comments</comments>
		<pubDate>Thu, 24 Jun 2010 03:09:50 +0000</pubDate>
		<dc:creator>Ryan Lane</dc:creator>
				<category><![CDATA[LDAP]]></category>
		<category><![CDATA[MediaWiki]]></category>

		<guid isPermaLink="false">http://ryandlane.com/blog/?p=288</guid>
		<description><![CDATA[This is a bugfix release related to the previous 1.2b release. The following has changed: Fixed issue with single domains, and non-auto-authentication domains being non-operational due to security fix in 1.2b Fixed another issue with mail me a password not working properly To download this version, please use the extension distributor (http://www.mediawiki.org/wiki/Special:ExtensionDistributor/LdapAuthentication), select “Development version [...]


Related posts:<ol><li><a href='http://ryandlane.com/blog/2010/06/23/ldapauthentication-1-2b-released-security-fix-for-register_globals-users/' rel='bookmark' title='Permanent Link: LdapAuthentication 1.2b released &#8211; Security fix for register_globals users'>LdapAuthentication 1.2b released &#8211; Security fix for register_globals users</a></li>
<li><a href='http://ryandlane.com/blog/2010/07/05/jsbreadcrumbs-0-4-released/' rel='bookmark' title='Permanent Link: JSBreadCrumbs 0.4 released'>JSBreadCrumbs 0.4 released</a></li>
<li><a href='http://ryandlane.com/blog/2010/07/08/jsbreadcrumbs-0-5-released/' rel='bookmark' title='Permanent Link: JSBreadCrumbs 0.5 released'>JSBreadCrumbs 0.5 released</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>This is a bugfix release related to the previous 1.2b release. The following has changed:</p>
<ul>
<li>Fixed issue with single domains, and non-auto-authentication domains being non-operational due to security fix in 1.2b</li>
<li>Fixed another issue with mail me a password not working properly</li>
</ul>
<p>To download this version, please use the extension distributor (http://www.mediawiki.org/wiki/Special:ExtensionDistributor/LdapAuthentication), select “Development version (trunk)”, and click “Continue”.</p>
<!-- Social Bookmarks BEGIN -->
<div class="social_bookmark">
<a><strong><em>Share:</em></strong></a>
<br />
<div class="d">
<br />
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://buzz.yahoo.com/submit?submitUrl=http%3A%2F%2Fryandlane.com%2Fblog%2F2010%2F06%2F24%2Fldapauthentication-1-2c-released%2F&amp;submitHeadline=LdapAuthentication+1.2c+released&amp;submitSummary=" rel="nofollow" title="Add to&nbsp;Buzz"><img class="social_img" src="http://ryandlane.com/blog/wp-content/plugins/social-bookmarks/images/buzz.png" title="Add to&nbsp;Buzz" alt="Add to&nbsp;Buzz" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://del.icio.us/post?url=http%3A%2F%2Fryandlane.com%2Fblog%2F2010%2F06%2F24%2Fldapauthentication-1-2c-released%2F&amp;title=LdapAuthentication+1.2c+released" rel="nofollow" title="Add to&nbsp;Del.icio.us"><img class="social_img" src="http://ryandlane.com/blog/wp-content/plugins/social-bookmarks/images/delicious.png" title="Add to&nbsp;Del.icio.us" alt="Add to&nbsp;Del.icio.us" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fryandlane.com%2Fblog%2F2010%2F06%2F24%2Fldapauthentication-1-2c-released%2F&amp;title=LdapAuthentication+1.2c+released" rel="nofollow" title="Add to&nbsp;digg"><img class="social_img" src="http://ryandlane.com/blog/wp-content/plugins/social-bookmarks/images/digg.png" title="Add to&nbsp;digg" alt="Add to&nbsp;digg" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.facebook.com/sharer.php?u=http%3A%2F%2Fryandlane.com%2Fblog%2F2010%2F06%2F24%2Fldapauthentication-1-2c-released%2F" rel="nofollow" title="Add to&nbsp;Facebook"><img class="social_img" src="http://ryandlane.com/blog/wp-content/plugins/social-bookmarks/images/facebook.png" title="Add to&nbsp;Facebook" alt="Add to&nbsp;Facebook" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fryandlane.com%2Fblog%2F2010%2F06%2F24%2Fldapauthentication-1-2c-released%2F&amp;title=LdapAuthentication+1.2c+released" rel="nofollow" title="Add to&nbsp;LinkedIn"><img class="social_img" src="http://ryandlane.com/blog/wp-content/plugins/social-bookmarks/images/linkedin.png" title="Add to&nbsp;LinkedIn" alt="Add to&nbsp;LinkedIn" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://reddit.com/submit?url=http%3A%2F%2Fryandlane.com%2Fblog%2F2010%2F06%2F24%2Fldapauthentication-1-2c-released%2F&amp;title=LdapAuthentication+1.2c+released" rel="nofollow" title="Add to&nbsp;reddit"><img class="social_img" src="http://ryandlane.com/blog/wp-content/plugins/social-bookmarks/images/reddit.png" title="Add to&nbsp;reddit" alt="Add to&nbsp;reddit" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://slashdot.org/bookmark.pl?url=http%3A%2F%2Fryandlane.com%2Fblog%2F2010%2F06%2F24%2Fldapauthentication-1-2c-released%2F&amp;title=LdapAuthentication+1.2c+released" rel="nofollow" title="Add to&nbsp;Slashdot"><img class="social_img" src="http://ryandlane.com/blog/wp-content/plugins/social-bookmarks/images/slashdot.png" title="Add to&nbsp;Slashdot" alt="Add to&nbsp;Slashdot" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fryandlane.com%2Fblog%2F2010%2F06%2F24%2Fldapauthentication-1-2c-released%2F&amp;title=LdapAuthentication+1.2c+released" rel="nofollow" title="Add to&nbsp;Stumble Upon"><img class="social_img" src="http://ryandlane.com/blog/wp-content/plugins/social-bookmarks/images/stumbleupon.png" title="Add to&nbsp;Stumble Upon" alt="Add to&nbsp;Stumble Upon" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://twitter.com/home/?status=Check+out+LdapAuthentication+1.2c+released+@+http%3A%2F%2Fryandlane.com%2Fblog%2F2010%2F06%2F24%2Fldapauthentication-1-2c-released%2F" rel="nofollow" title="Add to&nbsp;Twitter"><img class="social_img" src="http://ryandlane.com/blog/wp-content/plugins/social-bookmarks/images/twitter.png" title="Add to&nbsp;Twitter" alt="Add to&nbsp;Twitter" /></a>
<br />
</div>
</div>
<!-- Social Bookmarks END -->


<p>Related posts:<ol><li><a href='http://ryandlane.com/blog/2010/06/23/ldapauthentication-1-2b-released-security-fix-for-register_globals-users/' rel='bookmark' title='Permanent Link: LdapAuthentication 1.2b released &#8211; Security fix for register_globals users'>LdapAuthentication 1.2b released &#8211; Security fix for register_globals users</a></li>
<li><a href='http://ryandlane.com/blog/2010/07/05/jsbreadcrumbs-0-4-released/' rel='bookmark' title='Permanent Link: JSBreadCrumbs 0.4 released'>JSBreadCrumbs 0.4 released</a></li>
<li><a href='http://ryandlane.com/blog/2010/07/08/jsbreadcrumbs-0-5-released/' rel='bookmark' title='Permanent Link: JSBreadCrumbs 0.5 released'>JSBreadCrumbs 0.5 released</a></li>
</ol></p><img src="http://feeds.feedburner.com/~r/RyanLanesBlog_ldap/~4/5QHMGasV2Z0" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://ryandlane.com/blog/2010/06/24/ldapauthentication-1-2c-released/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://ryandlane.com/blog/2010/06/24/ldapauthentication-1-2c-released/</feedburner:origLink></item>
		<item>
		<title>LdapAuthentication 1.2b released – Security fix for register_globals users</title>
		<link>http://feedproxy.google.com/~r/RyanLanesBlog_ldap/~3/VCWcxP6FyGM/</link>
		<comments>http://ryandlane.com/blog/2010/06/23/ldapauthentication-1-2b-released-security-fix-for-register_globals-users/#comments</comments>
		<pubDate>Wed, 23 Jun 2010 01:27:40 +0000</pubDate>
		<dc:creator>Ryan Lane</dc:creator>
				<category><![CDATA[LDAP]]></category>
		<category><![CDATA[MediaWiki]]></category>

		<guid isPermaLink="false">http://ryandlane.com/blog/?p=286</guid>
		<description><![CDATA[This release contains a security bugfix for users of register_globals. Most configuration options in the extension did not have default values; this release sets defaults for all configuration globals. Users are recommended to update to this version, or disable register_globals. If you do not have register_globals enabled, you are not affected. The following has changed [...]


Related posts:<ol><li><a href='http://ryandlane.com/blog/2010/06/24/ldapauthentication-1-2c-released/' rel='bookmark' title='Permanent Link: LdapAuthentication 1.2c released'>LdapAuthentication 1.2c released</a></li>
<li><a href='http://ryandlane.com/blog/2010/07/05/jsbreadcrumbs-0-4-released/' rel='bookmark' title='Permanent Link: JSBreadCrumbs 0.4 released'>JSBreadCrumbs 0.4 released</a></li>
<li><a href='http://ryandlane.com/blog/2009/07/09/using-the-ldap-authentication-plugin-for-mediawiki-%e2%80%93-the-basics-part-3/' rel='bookmark' title='Permanent Link: Using the LDAP Authentication Plugin for MediaWiki – The Basics (Part 3)'>Using the LDAP Authentication Plugin for MediaWiki – The Basics (Part 3)</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>This release contains a security bugfix for users of register_globals. Most configuration options in the extension did not have default values; this release sets defaults for all configuration globals. Users are recommended to update to this version, or disable register_globals. If you do not have register_globals enabled, you are not affected.</p>
<p>The following has changed since 1.2a:</p>
<ul>
<li> Fixed issue with group synchronization and nested groups</li>
<li>Added support for exclusion groups in addition to required groups
<ul>
<li>Configured via $wgLDAPExcludedGroups; syntax the same as $wgLDAPRequiredGroups</li>
</ul>
</li>
<li>Fixed check for returns with no entries</li>
<li>Added memberOf support</li>
<li>Added patch for getting user&#8217;s primary group when using memberOf</li>
<li>Fixed group synchronization issue with memberOf support (patch by  Teddy Reed)</li>
<li>Fixed problem with usernames containing parenthesis</li>
<li>Fixed warnings in PHP 5.2.10 when some entries weren&#8217;t returned</li>
<li>Fixed issue with $wgLDAPGroupsPrevail</li>
<li>Fixed issue with mail temporary password button when email me a password support was enabled</li>
<li>Added support for non-standard ports
<ul>
<li>Configured via $wgLDAPPort &#8211; see options documentation</li>
</ul>
</li>
<li>Changed debug to output to a file
<ul>
<li>Configured via $wgDebugLogGroups["ldap"] &#8211; see options documentation</li>
</ul>
</li>
<li>Added support for modifying LDAP options when connecting
<ul>
<li>Configured via $wgLDAPOptions &#8211; see options documentation</li>
</ul>
</li>
<li>Added a security fix for register_globals users (seriously, turn register_globals off, if you have it on)</li>
</ul>
<p>To download this version, please use the <a href="http://www.mediawiki.org/wiki/Special:ExtensionDistributor/LdapAuthentication">extension distributor</a>, select &#8220;Development version (trunk)&#8221;, and click &#8220;Continue&#8221;.</p>
<!-- Social Bookmarks BEGIN -->
<div class="social_bookmark">
<a><strong><em>Share:</em></strong></a>
<br />
<div class="d">
<br />
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://buzz.yahoo.com/submit?submitUrl=http%3A%2F%2Fryandlane.com%2Fblog%2F2010%2F06%2F23%2Fldapauthentication-1-2b-released-security-fix-for-register_globals-users%2F&amp;submitHeadline=LdapAuthentication+1.2b+released+%26%238211%3B+Security+fix+for+register_globals+users&amp;submitSummary=" rel="nofollow" title="Add to&nbsp;Buzz"><img class="social_img" src="http://ryandlane.com/blog/wp-content/plugins/social-bookmarks/images/buzz.png" title="Add to&nbsp;Buzz" alt="Add to&nbsp;Buzz" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://del.icio.us/post?url=http%3A%2F%2Fryandlane.com%2Fblog%2F2010%2F06%2F23%2Fldapauthentication-1-2b-released-security-fix-for-register_globals-users%2F&amp;title=LdapAuthentication+1.2b+released+%26%238211%3B+Security+fix+for+register_globals+users" rel="nofollow" title="Add to&nbsp;Del.icio.us"><img class="social_img" src="http://ryandlane.com/blog/wp-content/plugins/social-bookmarks/images/delicious.png" title="Add to&nbsp;Del.icio.us" alt="Add to&nbsp;Del.icio.us" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fryandlane.com%2Fblog%2F2010%2F06%2F23%2Fldapauthentication-1-2b-released-security-fix-for-register_globals-users%2F&amp;title=LdapAuthentication+1.2b+released+%26%238211%3B+Security+fix+for+register_globals+users" rel="nofollow" title="Add to&nbsp;digg"><img class="social_img" src="http://ryandlane.com/blog/wp-content/plugins/social-bookmarks/images/digg.png" title="Add to&nbsp;digg" alt="Add to&nbsp;digg" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.facebook.com/sharer.php?u=http%3A%2F%2Fryandlane.com%2Fblog%2F2010%2F06%2F23%2Fldapauthentication-1-2b-released-security-fix-for-register_globals-users%2F" rel="nofollow" title="Add to&nbsp;Facebook"><img class="social_img" src="http://ryandlane.com/blog/wp-content/plugins/social-bookmarks/images/facebook.png" title="Add to&nbsp;Facebook" alt="Add to&nbsp;Facebook" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fryandlane.com%2Fblog%2F2010%2F06%2F23%2Fldapauthentication-1-2b-released-security-fix-for-register_globals-users%2F&amp;title=LdapAuthentication+1.2b+released+%26%238211%3B+Security+fix+for+register_globals+users" rel="nofollow" title="Add to&nbsp;LinkedIn"><img class="social_img" src="http://ryandlane.com/blog/wp-content/plugins/social-bookmarks/images/linkedin.png" title="Add to&nbsp;LinkedIn" alt="Add to&nbsp;LinkedIn" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://reddit.com/submit?url=http%3A%2F%2Fryandlane.com%2Fblog%2F2010%2F06%2F23%2Fldapauthentication-1-2b-released-security-fix-for-register_globals-users%2F&amp;title=LdapAuthentication+1.2b+released+%26%238211%3B+Security+fix+for+register_globals+users" rel="nofollow" title="Add to&nbsp;reddit"><img class="social_img" src="http://ryandlane.com/blog/wp-content/plugins/social-bookmarks/images/reddit.png" title="Add to&nbsp;reddit" alt="Add to&nbsp;reddit" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://slashdot.org/bookmark.pl?url=http%3A%2F%2Fryandlane.com%2Fblog%2F2010%2F06%2F23%2Fldapauthentication-1-2b-released-security-fix-for-register_globals-users%2F&amp;title=LdapAuthentication+1.2b+released+%26%238211%3B+Security+fix+for+register_globals+users" rel="nofollow" title="Add to&nbsp;Slashdot"><img class="social_img" src="http://ryandlane.com/blog/wp-content/plugins/social-bookmarks/images/slashdot.png" title="Add to&nbsp;Slashdot" alt="Add to&nbsp;Slashdot" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fryandlane.com%2Fblog%2F2010%2F06%2F23%2Fldapauthentication-1-2b-released-security-fix-for-register_globals-users%2F&amp;title=LdapAuthentication+1.2b+released+%26%238211%3B+Security+fix+for+register_globals+users" rel="nofollow" title="Add to&nbsp;Stumble Upon"><img class="social_img" src="http://ryandlane.com/blog/wp-content/plugins/social-bookmarks/images/stumbleupon.png" title="Add to&nbsp;Stumble Upon" alt="Add to&nbsp;Stumble Upon" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://twitter.com/home/?status=Check+out+LdapAuthentication+1.2b+released+%26%238211%3B+Security+fix+for+register_globals+users+@+http%3A%2F%2Fryandlane.com%2Fblog%2F2010%2F06%2F23%2Fldapauthentication-1-2b-released-security-fix-for-register_globals-users%2F" rel="nofollow" title="Add to&nbsp;Twitter"><img class="social_img" src="http://ryandlane.com/blog/wp-content/plugins/social-bookmarks/images/twitter.png" title="Add to&nbsp;Twitter" alt="Add to&nbsp;Twitter" /></a>
<br />
</div>
</div>
<!-- Social Bookmarks END -->


<p>Related posts:<ol><li><a href='http://ryandlane.com/blog/2010/06/24/ldapauthentication-1-2c-released/' rel='bookmark' title='Permanent Link: LdapAuthentication 1.2c released'>LdapAuthentication 1.2c released</a></li>
<li><a href='http://ryandlane.com/blog/2010/07/05/jsbreadcrumbs-0-4-released/' rel='bookmark' title='Permanent Link: JSBreadCrumbs 0.4 released'>JSBreadCrumbs 0.4 released</a></li>
<li><a href='http://ryandlane.com/blog/2009/07/09/using-the-ldap-authentication-plugin-for-mediawiki-%e2%80%93-the-basics-part-3/' rel='bookmark' title='Permanent Link: Using the LDAP Authentication Plugin for MediaWiki – The Basics (Part 3)'>Using the LDAP Authentication Plugin for MediaWiki – The Basics (Part 3)</a></li>
</ol></p><img src="http://feeds.feedburner.com/~r/RyanLanesBlog_ldap/~4/VCWcxP6FyGM" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://ryandlane.com/blog/2010/06/23/ldapauthentication-1-2b-released-security-fix-for-register_globals-users/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://ryandlane.com/blog/2010/06/23/ldapauthentication-1-2b-released-security-fix-for-register_globals-users/</feedburner:origLink></item>
		<item>
		<title>LDAP automount entry interoperability between Red Hat Enterprise Linux and Solaris for NFSv4</title>
		<link>http://feedproxy.google.com/~r/RyanLanesBlog_ldap/~3/PFjodwQZJkM/</link>
		<comments>http://ryandlane.com/blog/2010/02/09/ldap-automount-entry-interoperability-between-red-hat-enterprise-linux/#comments</comments>
		<pubDate>Tue, 09 Feb 2010 20:44:18 +0000</pubDate>
		<dc:creator>Ryan Lane</dc:creator>
				<category><![CDATA[LDAP]]></category>
		<category><![CDATA[Red Hat]]></category>
		<category><![CDATA[Solaris]]></category>

		<guid isPermaLink="false">http://ryandlane.com/wprdl/?p=193</guid>
		<description><![CDATA[Solaris 10 and above and Red Hat Enterprise Linux (RHEL) 5 and above have support for NFSv4. Unfortunately, how each OS handles the newest version is different, and the way it is mounted is drastically different. How each OS handles NFSv3 and NFSv4 All Linux distros treat NFSv4 as a different filesystem. Solaris treats NFSv4 [...]]]></description>
			<content:encoded><![CDATA[<p>Solaris 10 and above and Red Hat Enterprise Linux (RHEL) 5 and above have support for NFSv4. Unfortunately, how each OS handles the newest version is different, and the way it is mounted is drastically different.</p>

<h2>How each OS handles NFSv3 and NFSv4</h2>
<p>All Linux distros treat NFSv4 as a different filesystem. Solaris treats NFSv4 as a newer version, which is the sane, and sensible way of handling it IMO; thanks Linux&#8230;. To mount an NFSv4 filesystem in RHEL 5, you mount it the following way:</p>
<pre style="padding-left: 30px;">mount -t nfs4 &lt;server&gt;:&lt;share&gt; &lt;mountpoint&gt;</pre>
<p>For NFSv3, you mount it the following way:</p>
<pre style="padding-left: 30px;">mount -t nfs &lt;server&gt;:&lt;share&gt; &lt;mountpoint&gt;</pre>
<p>Solaris 10 will automatically mount an NFS share as version 4, if the server supports it, and the client is configured to support NFSv4. To check the versions supported by the server and the client, see the /etc/default/nfs configuration file. Here are the options to look for:</p>
<pre style="padding-left: 30px;"># Sets the minimum version of the NFS protocol that will be registered
# and offered by the server.  The default is 2.
#NFS_SERVER_VERSMIN=2

# Sets the maximum version of the NFS protocol that will be registered
# and offered by the server.  The default is 4.
#NFS_SERVER_VERSMAX=4

# Sets the minimum version of the NFS protocol that will be used by
# the NFS client.  Can be overridden by the "vers=" NFS mount option.
# The default is 2.
#NFS_CLIENT_VERSMIN=2

# Sets the maximum version of the NFS protocol that will be used by
# the NFS client.  Can be overridden by the "vers=" NFS mount option.
# If "vers=" is not specified for an NFS mount, this is the version
# that will be attempted first.  The default is 4.
#NFS_CLIENT_VERSMAX=4</pre>
<p>Notice that by default Solaris 10 will use NFSv4 for both clients and servers.</p>
<p>To manually mount a filesystem as NFSv4, you mount it the following way:</p>
<pre style="padding-left: 30px;">mount -F nfs -o vers=4 &lt;server&gt;:&lt;share&gt; &lt;mountpoint&gt;</pre>
<p>Solaris 9 doesn&#8217;t support NFSv4, only v3. To mount a filesystem as NFSv3, you mount it the following way:</p>
<pre style="padding-left: 30px;">mount -F nfs -o vers=3 &lt;server&gt;:&lt;share&gt; &lt;mountpoint&gt;</pre>
<p>If you are familiar with automount entries, you may already see the problem.</p>
<h2>The NFSv4 automount problem</h2>
<p>Linux is the cause of our problem. Implementing NFSv4 as a new filesystem instead of as a higher version number means we can&#8217;t simply pass a consistent option to the automounter to specify a mount as NFSv4. Here&#8217;s an example automount entry in LDAP:</p>
<pre style="padding-left: 30px;">dn: cn=test,nisMapName=auto_test,dc=example,dc=com
nisMapEntry: example-server:/example/share
objectClass: nisObject
objectClass: top
nisMapName: auto_test
cn: test</pre>
<p>If we want this to mount as NFSv4, we&#8217;ll need the following for RHEL 5 and above:</p>
<pre style="padding-left: 30px;">dn: cn=test,nisMapName=auto_test,dc=example,dc=com
nisMapEntry: -fstype=nfs4 example-server:/example/share
objectClass: nisObject
objectClass: top
nisMapName: auto_test
cn: test
</pre>
<p>This won&#8217;t work on Solaris, as Solaris doesn&#8217;t treat NFSv4 as a separate filesystem.</p>
<h2>Solving the problem</h2>
<h3>Creating the LDAP autofs entry</h3>
<p>To avoid duplicating all automount entries for RHEL 4 and5, and Solaris 9 and 10, we&#8217;ll need to do some trickery on the systems and in LDAP. What we want, is for Solaris 9 and below to see the following:</p>
<pre style="padding-left: 30px;">dn: cn=test,nisMapName=auto_test,dc=example,dc=com
nisMapEntry: -vers=3 example-server:/example/share
objectClass: nisObject
objectClass: top
nisMapName: auto_test
cn: test</pre>
<p>Solaris 10 and above to see the following:</p>
<pre style="padding-left: 30px;">dn: cn=test,nisMapName=auto_test,dc=example,dc=com
nisMapEntry: -vers=4 example-server:/example/share
objectClass: nisObject
objectClass: top
nisMapName: auto_test
cn: test</pre>
<p>RHEL 4 and below to see the following:</p>
<pre style="padding-left: 30px;">dn: cn=test,nisMapName=auto_test,dc=example,dc=com
nisMapEntry: -fstype=nfs example-server:/example/share
objectClass: nisObject
objectClass: top
nisMapName: auto_test
cn: test</pre>
<p>and RHEL 5 and above to see the following:</p>
<pre style="padding-left: 30px;">dn: cn=test,nisMapName=auto_test,dc=example,dc=com
nisMapEntry: -fstype=nfs4 example-server:/example/share
objectClass: nisObject
objectClass: top
nisMapName: auto_test
cn: test</pre>
<p>Thankfully, autofs on both RHEL and Solaris supports variable substitution. We can use the following entry to achieve the above results:</p>
<pre style="padding-left: 30px;">dn: cn=test,nisMapName=auto_test,dc=example,dc=com
nisMapEntry: -${NFSOPT}=${NFSVER} example-server:/example/share
objectClass: nisObject
objectClass: top
nisMapName: auto_test
cn: test</pre>
<p>The two above variables aren&#8217;t standard variables, so here&#8217;s where the trickery comes in.</p>
<h3>Setting the autofs variables on each OS</h3>
<p>On Solaris 9, we&#8217;ll have to modify autofs&#8217;s init script; the variables can be added to the autofs command like so:</p>
<pre style="padding-left: 30px;">/usr/lib/autofs automountd -D NFSOPT=vers -D NFSVER=3 &lt; /dev/null &gt; /dev/msglog 2&gt;&amp;1</pre>
<p>Specifically the &#8220;-D NFSOPT=vers -D NFSVER=3&#8243; portion of the line is the key portion.</p>
<p>On Solaris 10, the options can be added in /etc/default/autofs; simply add the following lines to the bottom of the file:</p>
<pre style="padding-left: 30px;">AUTOMOUNTD_ENV=NFSVER=4
AUTOMOUNTD_ENV=NFSOPT=vers
</pre>
<p>On RHEL 4 and below, the following can be added to /etc/sysconfig/autofs:</p>
<pre style="padding-left: 30px;">LOCALOPTIONS="-DNFSOPT=fstype -DNFSVER=nfs"</pre>
<p>On RHEL 5 and above, the following can be added to /etc/sysconfig/autofs:</p>
<pre style="padding-left: 30px;">OPTIONS="-DNFSOPT=fstype -DNFSVER=nfs4"</pre>
<p>You don&#8217;t necessarily need to use these variables; you can use any variables you want. Remember, though, if you change them, to change them all consistently.</p>
<h2>Downsides to this approach</h2>
<ol>
<li>You need to configure every single client to support it</li>
<li>Every NFSv4 automount entry needs to have &#8220;-${NFSOPT}=${NFSVER}&#8221; added</li>
<li>There is no way to make Solaris clients mount some mounts as NFSv3, and others as NFSv4</li>
</ol>
<div id="_mcePaste" style="overflow: hidden; position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px;"><cite>www.<strong>google</strong>.com/accounts/o8/id</cite></div>
<!-- Social Bookmarks BEGIN -->
<div class="social_bookmark">
<a><strong><em>Share:</em></strong></a>
<br />
<div class="d">
<br />
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://buzz.yahoo.com/submit?submitUrl=http%3A%2F%2Fryandlane.com%2Fblog%2F2010%2F02%2F09%2Fldap-automount-entry-interoperability-between-red-hat-enterprise-linux%2F&amp;submitHeadline=LDAP+automount+entry+interoperability+between+Red+Hat+Enterprise+Linux+and+Solaris+for+NFSv4&amp;submitSummary=" rel="nofollow" title="Add to&nbsp;Buzz"><img class="social_img" src="http://ryandlane.com/blog/wp-content/plugins/social-bookmarks/images/buzz.png" title="Add to&nbsp;Buzz" alt="Add to&nbsp;Buzz" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://del.icio.us/post?url=http%3A%2F%2Fryandlane.com%2Fblog%2F2010%2F02%2F09%2Fldap-automount-entry-interoperability-between-red-hat-enterprise-linux%2F&amp;title=LDAP+automount+entry+interoperability+between+Red+Hat+Enterprise+Linux+and+Solaris+for+NFSv4" rel="nofollow" title="Add to&nbsp;Del.icio.us"><img class="social_img" src="http://ryandlane.com/blog/wp-content/plugins/social-bookmarks/images/delicious.png" title="Add to&nbsp;Del.icio.us" alt="Add to&nbsp;Del.icio.us" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fryandlane.com%2Fblog%2F2010%2F02%2F09%2Fldap-automount-entry-interoperability-between-red-hat-enterprise-linux%2F&amp;title=LDAP+automount+entry+interoperability+between+Red+Hat+Enterprise+Linux+and+Solaris+for+NFSv4" rel="nofollow" title="Add to&nbsp;digg"><img class="social_img" src="http://ryandlane.com/blog/wp-content/plugins/social-bookmarks/images/digg.png" title="Add to&nbsp;digg" alt="Add to&nbsp;digg" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.facebook.com/sharer.php?u=http%3A%2F%2Fryandlane.com%2Fblog%2F2010%2F02%2F09%2Fldap-automount-entry-interoperability-between-red-hat-enterprise-linux%2F" rel="nofollow" title="Add to&nbsp;Facebook"><img class="social_img" src="http://ryandlane.com/blog/wp-content/plugins/social-bookmarks/images/facebook.png" title="Add to&nbsp;Facebook" alt="Add to&nbsp;Facebook" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fryandlane.com%2Fblog%2F2010%2F02%2F09%2Fldap-automount-entry-interoperability-between-red-hat-enterprise-linux%2F&amp;title=LDAP+automount+entry+interoperability+between+Red+Hat+Enterprise+Linux+and+Solaris+for+NFSv4" rel="nofollow" title="Add to&nbsp;LinkedIn"><img class="social_img" src="http://ryandlane.com/blog/wp-content/plugins/social-bookmarks/images/linkedin.png" title="Add to&nbsp;LinkedIn" alt="Add to&nbsp;LinkedIn" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://reddit.com/submit?url=http%3A%2F%2Fryandlane.com%2Fblog%2F2010%2F02%2F09%2Fldap-automount-entry-interoperability-between-red-hat-enterprise-linux%2F&amp;title=LDAP+automount+entry+interoperability+between+Red+Hat+Enterprise+Linux+and+Solaris+for+NFSv4" rel="nofollow" title="Add to&nbsp;reddit"><img class="social_img" src="http://ryandlane.com/blog/wp-content/plugins/social-bookmarks/images/reddit.png" title="Add to&nbsp;reddit" alt="Add to&nbsp;reddit" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://slashdot.org/bookmark.pl?url=http%3A%2F%2Fryandlane.com%2Fblog%2F2010%2F02%2F09%2Fldap-automount-entry-interoperability-between-red-hat-enterprise-linux%2F&amp;title=LDAP+automount+entry+interoperability+between+Red+Hat+Enterprise+Linux+and+Solaris+for+NFSv4" rel="nofollow" title="Add to&nbsp;Slashdot"><img class="social_img" src="http://ryandlane.com/blog/wp-content/plugins/social-bookmarks/images/slashdot.png" title="Add to&nbsp;Slashdot" alt="Add to&nbsp;Slashdot" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fryandlane.com%2Fblog%2F2010%2F02%2F09%2Fldap-automount-entry-interoperability-between-red-hat-enterprise-linux%2F&amp;title=LDAP+automount+entry+interoperability+between+Red+Hat+Enterprise+Linux+and+Solaris+for+NFSv4" rel="nofollow" title="Add to&nbsp;Stumble Upon"><img class="social_img" src="http://ryandlane.com/blog/wp-content/plugins/social-bookmarks/images/stumbleupon.png" title="Add to&nbsp;Stumble Upon" alt="Add to&nbsp;Stumble Upon" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://twitter.com/home/?status=Check+out+LDAP+automount+entry+interoperability+between+Red+Hat+Enterprise+Linux+and+Solaris+for+NFSv4+@+http%3A%2F%2Fryandlane.com%2Fblog%2F2010%2F02%2F09%2Fldap-automount-entry-interoperability-between-red-hat-enterprise-linux%2F" rel="nofollow" title="Add to&nbsp;Twitter"><img class="social_img" src="http://ryandlane.com/blog/wp-content/plugins/social-bookmarks/images/twitter.png" title="Add to&nbsp;Twitter" alt="Add to&nbsp;Twitter" /></a>
<br />
</div>
</div>
<!-- Social Bookmarks END -->
<img src="http://feeds.feedburner.com/~r/RyanLanesBlog_ldap/~4/PFjodwQZJkM" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://ryandlane.com/blog/2010/02/09/ldap-automount-entry-interoperability-between-red-hat-enterprise-linux/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		<feedburner:origLink>http://ryandlane.com/blog/2010/02/09/ldap-automount-entry-interoperability-between-red-hat-enterprise-linux/</feedburner:origLink></item>
		<item>
		<title>OpenSSO web agent conflicts with the MediaWiki parser, and a workaround</title>
		<link>http://feedproxy.google.com/~r/RyanLanesBlog_ldap/~3/eOSXuUWlYz8/</link>
		<comments>http://ryandlane.com/blog/2009/07/28/opensso-web-agent-conflicts-with-the-mediawiki-parser-and-a-workaround/#comments</comments>
		<pubDate>Tue, 28 Jul 2009 18:04:00 +0000</pubDate>
		<dc:creator>Ryan Lane</dc:creator>
				<category><![CDATA[LDAP]]></category>
		<category><![CDATA[MediaWiki]]></category>
		<category><![CDATA[fail]]></category>
		<category><![CDATA[opensso]]></category>

		<guid isPermaLink="false">http://ryandlane.com/wprdl/?p=179</guid>
		<description><![CDATA[Recently, I deployed OpenSSO as a web single sign on service for a number of web servers, one of which was running MediaWiki. I haven&#8217;t yet written a SAML2 plugin for MediaWiki, so I am running an OpenSSO web agent for Apache, with the LDAP plugin doing auto-authentication. After deploying the web agent, MediaWiki started [...]]]></description>
			<content:encoded><![CDATA[<p>Recently, I deployed OpenSSO as a web single sign on service for a number of web servers, one of which was running MediaWiki. I haven&#8217;t yet written a SAML2 plugin for MediaWiki, so I am running an OpenSSO web agent for Apache, with the LDAP plugin doing auto-authentication.</p>
<p>After deploying the web agent, MediaWiki started parsing things incorrectly. Wiki-syntax like:</p>
<pre style="padding-left: 30px;">== Test ==
== Test2 ==
=== Test 3 ===</pre>
<p>Was being corrupted, and turning into something like:</p>
<pre style="padding-left: 30px;">== Test ==== Test2 ===== Test3 ===</pre>
<p>I traced it down to a conflict between the OpenSSO web agent and php-xml (dom.so specifically). I&#8217;m not sure exactly what the issue is, but removing the php-xml package from Red Hat Enterprise Linux 5 (RHEL 5) solved the parsing problem. Unfortunately, some MediaWiki extensions, like ImageMap, require php-xml.</p>
<p>I was able to fix the issue in MediaWiki&#8217;s configuration by telling the parser to use plain PHP arrays for temporary storage instead of PHP&#8217;s DOM. I did this by putting the following into LocalSettings.php:</p>
<pre style="padding-left: 30px;"><span>$wgParserConf</span> = <span>array</span><span>(</span>
        <span>'class'</span> =&gt; <span>'Parser'</span>,
        <span>'preprocessorClass'</span> =&gt; <span>'Preprocessor_Hash'</span>,
<span>)</span>;</pre>
<p>If anyone has an idea on a better way to fix this, I&#8217;m all ears. I&#8217;d like to not have a nasty workaround like this.</p>
<!-- Social Bookmarks BEGIN -->
<div class="social_bookmark">
<a><strong><em>Share:</em></strong></a>
<br />
<div class="d">
<br />
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://buzz.yahoo.com/submit?submitUrl=http%3A%2F%2Fryandlane.com%2Fblog%2F2009%2F07%2F28%2Fopensso-web-agent-conflicts-with-the-mediawiki-parser-and-a-workaround%2F&amp;submitHeadline=OpenSSO+web+agent+conflicts+with+the+MediaWiki+parser%2C+and+a+workaround&amp;submitSummary=" rel="nofollow" title="Add to&nbsp;Buzz"><img class="social_img" src="http://ryandlane.com/blog/wp-content/plugins/social-bookmarks/images/buzz.png" title="Add to&nbsp;Buzz" alt="Add to&nbsp;Buzz" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://del.icio.us/post?url=http%3A%2F%2Fryandlane.com%2Fblog%2F2009%2F07%2F28%2Fopensso-web-agent-conflicts-with-the-mediawiki-parser-and-a-workaround%2F&amp;title=OpenSSO+web+agent+conflicts+with+the+MediaWiki+parser%2C+and+a+workaround" rel="nofollow" title="Add to&nbsp;Del.icio.us"><img class="social_img" src="http://ryandlane.com/blog/wp-content/plugins/social-bookmarks/images/delicious.png" title="Add to&nbsp;Del.icio.us" alt="Add to&nbsp;Del.icio.us" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fryandlane.com%2Fblog%2F2009%2F07%2F28%2Fopensso-web-agent-conflicts-with-the-mediawiki-parser-and-a-workaround%2F&amp;title=OpenSSO+web+agent+conflicts+with+the+MediaWiki+parser%2C+and+a+workaround" rel="nofollow" title="Add to&nbsp;digg"><img class="social_img" src="http://ryandlane.com/blog/wp-content/plugins/social-bookmarks/images/digg.png" title="Add to&nbsp;digg" alt="Add to&nbsp;digg" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.facebook.com/sharer.php?u=http%3A%2F%2Fryandlane.com%2Fblog%2F2009%2F07%2F28%2Fopensso-web-agent-conflicts-with-the-mediawiki-parser-and-a-workaround%2F" rel="nofollow" title="Add to&nbsp;Facebook"><img class="social_img" src="http://ryandlane.com/blog/wp-content/plugins/social-bookmarks/images/facebook.png" title="Add to&nbsp;Facebook" alt="Add to&nbsp;Facebook" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fryandlane.com%2Fblog%2F2009%2F07%2F28%2Fopensso-web-agent-conflicts-with-the-mediawiki-parser-and-a-workaround%2F&amp;title=OpenSSO+web+agent+conflicts+with+the+MediaWiki+parser%2C+and+a+workaround" rel="nofollow" title="Add to&nbsp;LinkedIn"><img class="social_img" src="http://ryandlane.com/blog/wp-content/plugins/social-bookmarks/images/linkedin.png" title="Add to&nbsp;LinkedIn" alt="Add to&nbsp;LinkedIn" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://reddit.com/submit?url=http%3A%2F%2Fryandlane.com%2Fblog%2F2009%2F07%2F28%2Fopensso-web-agent-conflicts-with-the-mediawiki-parser-and-a-workaround%2F&amp;title=OpenSSO+web+agent+conflicts+with+the+MediaWiki+parser%2C+and+a+workaround" rel="nofollow" title="Add to&nbsp;reddit"><img class="social_img" src="http://ryandlane.com/blog/wp-content/plugins/social-bookmarks/images/reddit.png" title="Add to&nbsp;reddit" alt="Add to&nbsp;reddit" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://slashdot.org/bookmark.pl?url=http%3A%2F%2Fryandlane.com%2Fblog%2F2009%2F07%2F28%2Fopensso-web-agent-conflicts-with-the-mediawiki-parser-and-a-workaround%2F&amp;title=OpenSSO+web+agent+conflicts+with+the+MediaWiki+parser%2C+and+a+workaround" rel="nofollow" title="Add to&nbsp;Slashdot"><img class="social_img" src="http://ryandlane.com/blog/wp-content/plugins/social-bookmarks/images/slashdot.png" title="Add to&nbsp;Slashdot" alt="Add to&nbsp;Slashdot" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fryandlane.com%2Fblog%2F2009%2F07%2F28%2Fopensso-web-agent-conflicts-with-the-mediawiki-parser-and-a-workaround%2F&amp;title=OpenSSO+web+agent+conflicts+with+the+MediaWiki+parser%2C+and+a+workaround" rel="nofollow" title="Add to&nbsp;Stumble Upon"><img class="social_img" src="http://ryandlane.com/blog/wp-content/plugins/social-bookmarks/images/stumbleupon.png" title="Add to&nbsp;Stumble Upon" alt="Add to&nbsp;Stumble Upon" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://twitter.com/home/?status=Check+out+OpenSSO+web+agent+conflicts+with+the+MediaWiki+parser%2C+and+a+workaround+@+http%3A%2F%2Fryandlane.com%2Fblog%2F2009%2F07%2F28%2Fopensso-web-agent-conflicts-with-the-mediawiki-parser-and-a-workaround%2F" rel="nofollow" title="Add to&nbsp;Twitter"><img class="social_img" src="http://ryandlane.com/blog/wp-content/plugins/social-bookmarks/images/twitter.png" title="Add to&nbsp;Twitter" alt="Add to&nbsp;Twitter" /></a>
<br />
</div>
</div>
<!-- Social Bookmarks END -->


<p>Related posts:<ol><li><a href='http://ryandlane.com/blog/2009/08/12/new-opensso-authentication-plugin-for-mediawiki/' rel='bookmark' title='Permanent Link: New OpenSSO authentication plugin for MediaWiki'>New OpenSSO authentication plugin for MediaWiki</a></li>
<li><a href='http://ryandlane.com/blog/2009/06/16/using-the-ldap-authentication-plugin-for-mediawiki-the-basics-part-2/' rel='bookmark' title='Permanent Link: Using the LDAP Authentication Plugin for MediaWiki &#8211; The Basics (Part 2)'>Using the LDAP Authentication Plugin for MediaWiki &#8211; The Basics (Part 2)</a></li>
<li><a href='http://ryandlane.com/blog/2009/03/23/using-the-ldap-authentication-plugin-for-mediawiki-the-basics-part-1/' rel='bookmark' title='Permanent Link: Using the LDAP Authentication Plugin for MediaWiki &#8211; The Basics (Part 1)'>Using the LDAP Authentication Plugin for MediaWiki &#8211; The Basics (Part 1)</a></li>
</ol></p><img src="http://feeds.feedburner.com/~r/RyanLanesBlog_ldap/~4/eOSXuUWlYz8" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://ryandlane.com/blog/2009/07/28/opensso-web-agent-conflicts-with-the-mediawiki-parser-and-a-workaround/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://ryandlane.com/blog/2009/07/28/opensso-web-agent-conflicts-with-the-mediawiki-parser-and-a-workaround/</feedburner:origLink></item>
		<item>
		<title>Using the LDAP Authentication Plugin for MediaWiki – The Basics (Part 3)</title>
		<link>http://feedproxy.google.com/~r/RyanLanesBlog_ldap/~3/p-lnNIUFy6A/</link>
		<comments>http://ryandlane.com/blog/2009/07/09/using-the-ldap-authentication-plugin-for-mediawiki-%e2%80%93-the-basics-part-3/#comments</comments>
		<pubDate>Thu, 09 Jul 2009 20:09:49 +0000</pubDate>
		<dc:creator>Ryan Lane</dc:creator>
				<category><![CDATA[LDAP]]></category>
		<category><![CDATA[MediaWiki]]></category>
		<category><![CDATA[extension]]></category>

		<guid isPermaLink="false">http://ryandlane.com/wprdl/?p=148</guid>
		<description><![CDATA[In part 1 of this series, I discussed basic password authentication for Active Directory (AD). In this article I will discuss enabling group restrictions and synchronization, and retrieving preferences for AD. I&#8217;ll first discuss group restrictions, then synchronization, then retrieving preferences. Group restrictions and synchronization will require you to somewhat understand the LDAP structure that [...]]]></description>
			<content:encoded><![CDATA[<p>In <a href="../2009/03/23/using-the-ldap-authentication-plugin-for-mediawiki-the-basics-part-1/">part 1</a> of this series, I discussed basic password authentication for Active Directory (AD). In this article I will discuss enabling group restrictions and synchronization, and retrieving preferences for AD. I&#8217;ll first discuss group restrictions, then synchronization, then retrieving preferences.</p>
<p>Group restrictions and synchronization will require you to somewhat understand the LDAP structure that your AD environment is built upon. Don&#8217;t worry, this isn&#8217;t as scary as it sounds, and I&#8217;ll explain how to find all of the information you&#8217;ll require.</p>

<h2>Prerequisites</h2>
<p>Before you start, you must have authentication working. See <a href="../2009/03/23/using-the-ldap-authentication-plugin-for-mediawiki-the-basics-part-1/">part 1</a> of this series to enable authentication. Don&#8217;t try to get everything working at the same time. First ensure authentication is working, then enable group restrictions, then go from there.</p>
<p>For this article we will use the domain configured in part 1:</p>
<pre style="padding-left: 30px;">$wgLDAPDomainNames = array( "TESTAD" );</pre>
<h2>Group configuration</h2>
<h3>Shared group options</h3>
<h4>Telling the plugin how to map users to group members</h4>
<p>AD stores full Distinguished Names (DN)s like <em>cn=Ryan Lane,dc=testad,dc=example,dc=com</em> in groups, so we&#8217;ll need to tell the plugin to use full DNs. Also, we&#8217;ll need to tell the plugin how to get the user&#8217;s DN. Place the following in <strong>LocalSettings.php</strong>:</p>
<pre style="padding-left: 30px;"><span>$wgLDAPGroupUseFullDN</span> <span>=</span> <span>array</span><span>(</span> <span>"TESTAD"</span><span>=&gt;</span>true <span>)</span><span>;
</span><span>$wgLDAPBaseDNs</span> <span>=</span> <span>array</span><span>(</span> <span>'TESTAD'</span> <span>=&gt;</span> <span>'dc=testad,dc=example,dc=com'</span><span> )</span><span>;
</span><span>$wgLDAPSearchAttributes</span> <span>=</span> <span>array</span><span>(</span> <span>'TESTAD'</span> <span>=&gt;</span> <span>'sAMAccountName'</span> <span>);</span></pre>
<h4>Telling the plugin how to find users in groups</h4>
<p>For the plugin to find your groups, it needs to know how to search for them. There are two methods for doing this: The first (and easiest) way to do this is to use memberOf. The second way is to tell the plugin the attribute and objectclass used by the group, and the attribute used for member of the group.</p>
<h5>Using memberOf</h5>
<p>Currently, the plugin cannot find the primary group of a user using memberOf. If you need to restrict groups based on user&#8217;s primary groups, do not use memberOf. To enable memberOf for AD, put the following in <strong>LocalSettings.php</strong>:</p>
<pre style="padding-left: 30px;"><span>$wgLDAPGroupsUseMemberOf</span> <span>=</span> <span>array</span><span>(</span> "TESTAD" =&gt; true );</pre>
<h5>Manually configure the search</h5>
<p>Thankfully, most (all?) AD configurations use the same attributes and objectclasses for group membership, so this is fairly straightforward. Put the following into <strong>LocalSettings.php</strong>:</p>
<pre style="padding-left: 30px;"><span>//The objectclass of the groups we want to search for</span>
<span>$wgLDAPGroupObjectclass</span> <span>=</span> <span>array</span><span>(</span> <span>"TESTAD"</span><span>=&gt;</span><span>"group"</span> <span>)</span><span>;</span>

<span>//The attribute used for group members</span>
<span>$wgLDAPGroupAttribute</span> <span>=</span> <span>array</span><span>(</span> <span>"TESTAD"</span><span>=&gt;</span><span>"member"</span> <span>)</span><span>;</span>

<span>//The naming attribute of the group</span>
<span>$wgLDAPGroupNameAttribute</span> <span>=</span> <span>array</span><span>(</span> <span>"TESTAD"</span><span>=&gt;</span><span>"cn"</span> <span>)</span><span>;</span></pre>
<h3>Group restrictions</h3>
<p>The LDAP plugin supports two types of group restriction. The first is a list of groups a user is required to be a member of (required groups), the second is a list of groups a user cannot be a member of (excluded groups). Both types of restrictions can be used simultaneously.</p>
<h4>Required groups</h4>
<p>To require a user to be a member of a group (such as <em>cn=wiki-users,ou=groups,dc=testad,dc=example,dc=com</em>), put the following into <strong>LocalSettings.php</strong>:</p>
<pre style="padding-left: 30px;"><span>$wgLDAPRequiredGroups</span> <span>=</span> <span>array</span><span>(</span> "TESTAD"=&gt; array( "cn=wiki-users,ou=groups,dc=testad,dc=example,dc=com" ) );</pre>
<h4>Excluded groups</h4>
<p>To require a user to not be a member of a specific group (such as <em>cn=excluded-wiki-users,ou=groups,dc=testad,dc=example,dc=com</em>), put the following into <strong>LocalSettings.php</strong>:</p>
<pre style="padding-left: 30px;"><span>$wgLDAPExcludedGroups</span> <span>=</span> <span>array</span><span>(</span> "TESTAD"=&gt; array( "cn=excluded-wiki-users,ou=groups,dc=testad,dc=example,dc=com" ) );</pre>
<h3>Group synchronization</h3>
<p>Group synchronization allows you to manage MediaWiki authorization using groups defined in your AD server. To enable synchronization, simply add the following to LocalSettings.php:</p>
<pre style="padding-left: 30px;"><span>$wgLDAPUseLDAPGroups</span> <span>=</span> <span>array</span><span>(</span> <span>"TESTAD"</span><span>=&gt;</span>true );</pre>
<p>To use LDAP groups, you&#8217;ll have to define their permissions; say for instance you have a group called &#8220;wiki-users&#8221;, you could enable edit permissions for users in that group by adding the following to LocalSettings.php:</p>
<pre style="padding-left: 30px;"><span>$wgGroupPermissions</span><span>[</span><span>'wiki-users'</span><span>]</span><span>[</span><span>'edit'</span><span>]</span> <span>=</span> <span>true</span><span>;</span></pre>
<p>If you&#8217;d like to add sysop permissions to a group called &#8220;wiki-admins&#8221;, you could put the following into LocalSettings.php:</p>
<pre style="padding-left: 30px;"><span>$wgGroupPermissions</span><span>[</span><span>'wiki-admin'</span><span>] = </span><span>$wgGroupPermissions</span><span>[</span><span>'sysop'</span><span>]</span>;</pre>
<p>Overall, group synchronization is far more powerful than group restriction. See MediaWiki&#8217;s <a href="http://www.mediawiki.org/wiki/Manual:User_rights">user rights documentation</a> for more information on controlling access.</p>
<h2>Retrieving preferences</h2>
<p>The LDAP plugin can pull certain attributes from AD, and assign them to MediaWiki user preferences. The MediaWiki attributes currently available are <em>email</em>, <em>realname</em>, <em>nickname</em>, and <em>language</em>. You can configure which MediaWiki preference maps to which AD attribute; put the following in your LocalSettings.php to retrieve preferences:</p>
<pre style="padding-left: 30px;"><span>$wgLDAPPreferences</span> <span>=</span> <span>array</span><span>(</span> <span>"TESTAD"</span><span>=&gt;</span>array<span>(</span> <span>"email"</span><span>=&gt;</span><span>"mail"</span><span>,</span><span>"realname"</span><span>=&gt;</span><span>"cn"</span><span>,</span><span>"nickname"</span><span>=&gt;</span><span>"sAMAccountName"</span><span>,</span><span>"language"</span><span>=&gt;</span><span>"preferredLanguage"</span><span>)</span> <span>)</span><span>;</span></pre>
<h2>Finding user and group DNs, and object attributes</h2>
<p>To find the DN of a user in an AD group for use in any options mentioned above, use the <strong>dsquery</strong> command:</p>
<pre style="padding-left: 30px;">dsquery group -name "wiki-users"
<em>"cn=wiki-users,ou=groups,dc=testad,dc=example,dc=com"</em></pre>
<p>To get the value of specific attributes, use the <strong>dsquery</strong> command in conjunction with the <strong>dsget</strong> command:</p>
<pre style="padding-left: 30px;">dsquery user -name "test-user"
<em>"cn=test-user,ou=Domain Users,dc=testad,dc=example,dc=com"</em>
dsget "cn=test-user,ou=Domain Users,dc=testad,dc=example,dc=com" -upn
<em>  upn
  test-user@TESTAD.EXAMPLE.COM</em></pre>
<p>You can get a lot of information with these commands; to find out what else you can find, see the help documentation using <strong>dsquery /?</strong>.</p>
<h2>Test your configuration by logging in with an LDAP user</h2>
<p>If you are doing group synchronization, you should ensure users are being correctly added and removed from MediaWiki groups when they are being added and removed from your AD groups. If you are retrieving preferences, you should ensure they are being updated when you log in.</p>
<p>If you have any questions, you should post them on the <a href="http://www.mediawiki.org/wiki/Extension_talk:LDAP_Authentication">discussion page for the plugin</a> on mediawiki.org, or leave me a comment (the former is preferred).</p>
<!-- Social Bookmarks BEGIN -->
<div class="social_bookmark">
<a><strong><em>Share:</em></strong></a>
<br />
<div class="d">
<br />
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://buzz.yahoo.com/submit?submitUrl=http%3A%2F%2Fryandlane.com%2Fblog%2F2009%2F07%2F09%2Fusing-the-ldap-authentication-plugin-for-mediawiki-%25e2%2580%2593-the-basics-part-3%2F&amp;submitHeadline=Using+the+LDAP+Authentication+Plugin+for+MediaWiki+%E2%80%93+The+Basics+%28Part+3%29&amp;submitSummary=" rel="nofollow" title="Add to&nbsp;Buzz"><img class="social_img" src="http://ryandlane.com/blog/wp-content/plugins/social-bookmarks/images/buzz.png" title="Add to&nbsp;Buzz" alt="Add to&nbsp;Buzz" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://del.icio.us/post?url=http%3A%2F%2Fryandlane.com%2Fblog%2F2009%2F07%2F09%2Fusing-the-ldap-authentication-plugin-for-mediawiki-%25e2%2580%2593-the-basics-part-3%2F&amp;title=Using+the+LDAP+Authentication+Plugin+for+MediaWiki+%E2%80%93+The+Basics+%28Part+3%29" rel="nofollow" title="Add to&nbsp;Del.icio.us"><img class="social_img" src="http://ryandlane.com/blog/wp-content/plugins/social-bookmarks/images/delicious.png" title="Add to&nbsp;Del.icio.us" alt="Add to&nbsp;Del.icio.us" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fryandlane.com%2Fblog%2F2009%2F07%2F09%2Fusing-the-ldap-authentication-plugin-for-mediawiki-%25e2%2580%2593-the-basics-part-3%2F&amp;title=Using+the+LDAP+Authentication+Plugin+for+MediaWiki+%E2%80%93+The+Basics+%28Part+3%29" rel="nofollow" title="Add to&nbsp;digg"><img class="social_img" src="http://ryandlane.com/blog/wp-content/plugins/social-bookmarks/images/digg.png" title="Add to&nbsp;digg" alt="Add to&nbsp;digg" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.facebook.com/sharer.php?u=http%3A%2F%2Fryandlane.com%2Fblog%2F2009%2F07%2F09%2Fusing-the-ldap-authentication-plugin-for-mediawiki-%25e2%2580%2593-the-basics-part-3%2F" rel="nofollow" title="Add to&nbsp;Facebook"><img class="social_img" src="http://ryandlane.com/blog/wp-content/plugins/social-bookmarks/images/facebook.png" title="Add to&nbsp;Facebook" alt="Add to&nbsp;Facebook" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fryandlane.com%2Fblog%2F2009%2F07%2F09%2Fusing-the-ldap-authentication-plugin-for-mediawiki-%25e2%2580%2593-the-basics-part-3%2F&amp;title=Using+the+LDAP+Authentication+Plugin+for+MediaWiki+%E2%80%93+The+Basics+%28Part+3%29" rel="nofollow" title="Add to&nbsp;LinkedIn"><img class="social_img" src="http://ryandlane.com/blog/wp-content/plugins/social-bookmarks/images/linkedin.png" title="Add to&nbsp;LinkedIn" alt="Add to&nbsp;LinkedIn" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://reddit.com/submit?url=http%3A%2F%2Fryandlane.com%2Fblog%2F2009%2F07%2F09%2Fusing-the-ldap-authentication-plugin-for-mediawiki-%25e2%2580%2593-the-basics-part-3%2F&amp;title=Using+the+LDAP+Authentication+Plugin+for+MediaWiki+%E2%80%93+The+Basics+%28Part+3%29" rel="nofollow" title="Add to&nbsp;reddit"><img class="social_img" src="http://ryandlane.com/blog/wp-content/plugins/social-bookmarks/images/reddit.png" title="Add to&nbsp;reddit" alt="Add to&nbsp;reddit" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://slashdot.org/bookmark.pl?url=http%3A%2F%2Fryandlane.com%2Fblog%2F2009%2F07%2F09%2Fusing-the-ldap-authentication-plugin-for-mediawiki-%25e2%2580%2593-the-basics-part-3%2F&amp;title=Using+the+LDAP+Authentication+Plugin+for+MediaWiki+%E2%80%93+The+Basics+%28Part+3%29" rel="nofollow" title="Add to&nbsp;Slashdot"><img class="social_img" src="http://ryandlane.com/blog/wp-content/plugins/social-bookmarks/images/slashdot.png" title="Add to&nbsp;Slashdot" alt="Add to&nbsp;Slashdot" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fryandlane.com%2Fblog%2F2009%2F07%2F09%2Fusing-the-ldap-authentication-plugin-for-mediawiki-%25e2%2580%2593-the-basics-part-3%2F&amp;title=Using+the+LDAP+Authentication+Plugin+for+MediaWiki+%E2%80%93+The+Basics+%28Part+3%29" rel="nofollow" title="Add to&nbsp;Stumble Upon"><img class="social_img" src="http://ryandlane.com/blog/wp-content/plugins/social-bookmarks/images/stumbleupon.png" title="Add to&nbsp;Stumble Upon" alt="Add to&nbsp;Stumble Upon" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://twitter.com/home/?status=Check+out+Using+the+LDAP+Authentication+Plugin+for+MediaWiki+%E2%80%93+The+Basics+%28Part+3%29+@+http%3A%2F%2Fryandlane.com%2Fblog%2F2009%2F07%2F09%2Fusing-the-ldap-authentication-plugin-for-mediawiki-%25e2%2580%2593-the-basics-part-3%2F" rel="nofollow" title="Add to&nbsp;Twitter"><img class="social_img" src="http://ryandlane.com/blog/wp-content/plugins/social-bookmarks/images/twitter.png" title="Add to&nbsp;Twitter" alt="Add to&nbsp;Twitter" /></a>
<br />
</div>
</div>
<!-- Social Bookmarks END -->


<p>Related posts:<ol><li><a href='http://ryandlane.com/blog/2009/03/23/using-the-ldap-authentication-plugin-for-mediawiki-the-basics-part-1/' rel='bookmark' title='Permanent Link: Using the LDAP Authentication Plugin for MediaWiki &#8211; The Basics (Part 1)'>Using the LDAP Authentication Plugin for MediaWiki &#8211; The Basics (Part 1)</a></li>
<li><a href='http://ryandlane.com/blog/2009/06/16/using-the-ldap-authentication-plugin-for-mediawiki-the-basics-part-2/' rel='bookmark' title='Permanent Link: Using the LDAP Authentication Plugin for MediaWiki &#8211; The Basics (Part 2)'>Using the LDAP Authentication Plugin for MediaWiki &#8211; The Basics (Part 2)</a></li>
<li><a href='http://ryandlane.com/blog/2009/06/18/semi-anonymous-users-in-mediawiki-using-the-ldap-authentication-extension/' rel='bookmark' title='Permanent Link: Semi-anonymous users in MediaWiki using the LDAP Authentication extension'>Semi-anonymous users in MediaWiki using the LDAP Authentication extension</a></li>
</ol></p><img src="http://feeds.feedburner.com/~r/RyanLanesBlog_ldap/~4/p-lnNIUFy6A" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://ryandlane.com/blog/2009/07/09/using-the-ldap-authentication-plugin-for-mediawiki-%e2%80%93-the-basics-part-3/feed/</wfw:commentRss>
		<slash:comments>42</slash:comments>
		<feedburner:origLink>http://ryandlane.com/blog/2009/07/09/using-the-ldap-authentication-plugin-for-mediawiki-%e2%80%93-the-basics-part-3/</feedburner:origLink></item>
		<item>
		<title>SSL replication and CA trusts in Sun Directory Server 6.x</title>
		<link>http://feedproxy.google.com/~r/RyanLanesBlog_ldap/~3/_acvl6xX91Y/</link>
		<comments>http://ryandlane.com/blog/2009/06/19/ssl-replication-and-ca-trusts-in-sun-directory-server-6-x/#comments</comments>
		<pubDate>Fri, 19 Jun 2009 18:26:18 +0000</pubDate>
		<dc:creator>Ryan Lane</dc:creator>
				<category><![CDATA[LDAP]]></category>
		<category><![CDATA[pki]]></category>

		<guid isPermaLink="false">http://ryandlane.com/wprdl/?p=146</guid>
		<description><![CDATA[If, like me, you have had issues with replication in Sun Directory Server, maybe this post will help. The dsadm list-certs -C command will show you what CA certificates you are trusting, but it won&#8217;t show you how it is trusting a certificate. If you are getting an error like &#8220;Bind failed with response: Failed [...]


Related posts:<ol><li><a href='http://ryandlane.com/blog/2008/10/21/seamless-smartcard-login-with-pam_pkcs11-and-pam_krb5-against-an-active-directory-domain-using-red-hat-enterprise-linux-5-part-1/' rel='bookmark' title='Permanent Link: Seamless Smartcard login with pam_pkcs11, and pam_krb5 against an Active Directory Domain using Red Hat Enterprise Linux 5 (Part 1)'>Seamless Smartcard login with pam_pkcs11, and pam_krb5 against an Active Directory Domain using Red Hat Enterprise Linux 5 (Part 1)</a></li>
<li><a href='http://ryandlane.com/blog/2008/12/08/seamless-smartcard-login-with-pam_pkcs11-and-pam_krb5-against-an-active-directory-domain-using-red-hat-enterprise-linux-5-part-3/' rel='bookmark' title='Permanent Link: Seamless Smartcard login with pam_pkcs11, and pam_krb5 against an Active Directory Domain using Red Hat Enterprise Linux 5 (Part 3)'>Seamless Smartcard login with pam_pkcs11, and pam_krb5 against an Active Directory Domain using Red Hat Enterprise Linux 5 (Part 3)</a></li>
<li><a href='http://ryandlane.com/blog/2008/10/24/seamless-smartcard-login-with-pam_pkcs11-and-pam_krb5-against-an-active-directory-domain-using-red-hat-enterprise-linux-5-part-2/' rel='bookmark' title='Permanent Link: Seamless Smartcard login with pam_pkcs11, and pam_krb5 against an Active Directory Domain using Red Hat Enterprise Linux 5 (Part 2)'>Seamless Smartcard login with pam_pkcs11, and pam_krb5 against an Active Directory Domain using Red Hat Enterprise Linux 5 (Part 2)</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>If, like me, you have had issues with replication in Sun Directory Server, maybe this post will help.</p>
<p>The <strong>dsadm list-certs -C</strong> command will show you <em>what</em> CA certificates you are trusting, but it won&#8217;t show you <em>how</em> it is trusting a certificate. If you are getting an error like &#8220;Bind failed with response: Failed to bind to remote (900).&#8221;, and you <em>know</em> SSL should be working properly, you probably want to check to see exactly how your CA certificates are being trusted.</p>
<p>To do this, use the <strong>certutil</strong> command:</p>
<pre style="padding-left: 30px;">certutil -L -d /var/opt/SUNWdsee/dsins1/alias -P slapd-</pre>
<p>The trust <em>should</em> show as &#8220;CT,,&#8221;. If it is showing as &#8220;c,c,c&#8221; or pretty much anything else, your CA certificate isn&#8217;t trusted properly. You can remove the  certificate and re-add it using certutil in the following ways:</p>
<pre style="padding-left: 30px;">certutil  -D -n "&lt;your CA cert's alias&gt;" -P slapd- -d /var/opt/SUNWdsee/dsins1/alias
certutil  -A -n "&lt;your CA cert's alias&gt;" -P slapd- -d /var/opt/SUNWdsee/dsins1/alias -i &lt;location of your CA cert&gt; -a</pre>
<p>Now restart your directory server, and test replication. If you are lucky, this is your problem.</p>
<!-- Social Bookmarks BEGIN -->
<div class="social_bookmark">
<a><strong><em>Share:</em></strong></a>
<br />
<div class="d">
<br />
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://buzz.yahoo.com/submit?submitUrl=http%3A%2F%2Fryandlane.com%2Fblog%2F2009%2F06%2F19%2Fssl-replication-and-ca-trusts-in-sun-directory-server-6-x%2F&amp;submitHeadline=SSL+replication+and+CA+trusts+in+Sun+Directory+Server+6.x&amp;submitSummary=" rel="nofollow" title="Add to&nbsp;Buzz"><img class="social_img" src="http://ryandlane.com/blog/wp-content/plugins/social-bookmarks/images/buzz.png" title="Add to&nbsp;Buzz" alt="Add to&nbsp;Buzz" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://del.icio.us/post?url=http%3A%2F%2Fryandlane.com%2Fblog%2F2009%2F06%2F19%2Fssl-replication-and-ca-trusts-in-sun-directory-server-6-x%2F&amp;title=SSL+replication+and+CA+trusts+in+Sun+Directory+Server+6.x" rel="nofollow" title="Add to&nbsp;Del.icio.us"><img class="social_img" src="http://ryandlane.com/blog/wp-content/plugins/social-bookmarks/images/delicious.png" title="Add to&nbsp;Del.icio.us" alt="Add to&nbsp;Del.icio.us" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fryandlane.com%2Fblog%2F2009%2F06%2F19%2Fssl-replication-and-ca-trusts-in-sun-directory-server-6-x%2F&amp;title=SSL+replication+and+CA+trusts+in+Sun+Directory+Server+6.x" rel="nofollow" title="Add to&nbsp;digg"><img class="social_img" src="http://ryandlane.com/blog/wp-content/plugins/social-bookmarks/images/digg.png" title="Add to&nbsp;digg" alt="Add to&nbsp;digg" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.facebook.com/sharer.php?u=http%3A%2F%2Fryandlane.com%2Fblog%2F2009%2F06%2F19%2Fssl-replication-and-ca-trusts-in-sun-directory-server-6-x%2F" rel="nofollow" title="Add to&nbsp;Facebook"><img class="social_img" src="http://ryandlane.com/blog/wp-content/plugins/social-bookmarks/images/facebook.png" title="Add to&nbsp;Facebook" alt="Add to&nbsp;Facebook" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fryandlane.com%2Fblog%2F2009%2F06%2F19%2Fssl-replication-and-ca-trusts-in-sun-directory-server-6-x%2F&amp;title=SSL+replication+and+CA+trusts+in+Sun+Directory+Server+6.x" rel="nofollow" title="Add to&nbsp;LinkedIn"><img class="social_img" src="http://ryandlane.com/blog/wp-content/plugins/social-bookmarks/images/linkedin.png" title="Add to&nbsp;LinkedIn" alt="Add to&nbsp;LinkedIn" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://reddit.com/submit?url=http%3A%2F%2Fryandlane.com%2Fblog%2F2009%2F06%2F19%2Fssl-replication-and-ca-trusts-in-sun-directory-server-6-x%2F&amp;title=SSL+replication+and+CA+trusts+in+Sun+Directory+Server+6.x" rel="nofollow" title="Add to&nbsp;reddit"><img class="social_img" src="http://ryandlane.com/blog/wp-content/plugins/social-bookmarks/images/reddit.png" title="Add to&nbsp;reddit" alt="Add to&nbsp;reddit" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://slashdot.org/bookmark.pl?url=http%3A%2F%2Fryandlane.com%2Fblog%2F2009%2F06%2F19%2Fssl-replication-and-ca-trusts-in-sun-directory-server-6-x%2F&amp;title=SSL+replication+and+CA+trusts+in+Sun+Directory+Server+6.x" rel="nofollow" title="Add to&nbsp;Slashdot"><img class="social_img" src="http://ryandlane.com/blog/wp-content/plugins/social-bookmarks/images/slashdot.png" title="Add to&nbsp;Slashdot" alt="Add to&nbsp;Slashdot" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fryandlane.com%2Fblog%2F2009%2F06%2F19%2Fssl-replication-and-ca-trusts-in-sun-directory-server-6-x%2F&amp;title=SSL+replication+and+CA+trusts+in+Sun+Directory+Server+6.x" rel="nofollow" title="Add to&nbsp;Stumble Upon"><img class="social_img" src="http://ryandlane.com/blog/wp-content/plugins/social-bookmarks/images/stumbleupon.png" title="Add to&nbsp;Stumble Upon" alt="Add to&nbsp;Stumble Upon" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://twitter.com/home/?status=Check+out+SSL+replication+and+CA+trusts+in+Sun+Directory+Server+6.x+@+http%3A%2F%2Fryandlane.com%2Fblog%2F2009%2F06%2F19%2Fssl-replication-and-ca-trusts-in-sun-directory-server-6-x%2F" rel="nofollow" title="Add to&nbsp;Twitter"><img class="social_img" src="http://ryandlane.com/blog/wp-content/plugins/social-bookmarks/images/twitter.png" title="Add to&nbsp;Twitter" alt="Add to&nbsp;Twitter" /></a>
<br />
</div>
</div>
<!-- Social Bookmarks END -->


<p>Related posts:<ol><li><a href='http://ryandlane.com/blog/2008/10/21/seamless-smartcard-login-with-pam_pkcs11-and-pam_krb5-against-an-active-directory-domain-using-red-hat-enterprise-linux-5-part-1/' rel='bookmark' title='Permanent Link: Seamless Smartcard login with pam_pkcs11, and pam_krb5 against an Active Directory Domain using Red Hat Enterprise Linux 5 (Part 1)'>Seamless Smartcard login with pam_pkcs11, and pam_krb5 against an Active Directory Domain using Red Hat Enterprise Linux 5 (Part 1)</a></li>
<li><a href='http://ryandlane.com/blog/2008/12/08/seamless-smartcard-login-with-pam_pkcs11-and-pam_krb5-against-an-active-directory-domain-using-red-hat-enterprise-linux-5-part-3/' rel='bookmark' title='Permanent Link: Seamless Smartcard login with pam_pkcs11, and pam_krb5 against an Active Directory Domain using Red Hat Enterprise Linux 5 (Part 3)'>Seamless Smartcard login with pam_pkcs11, and pam_krb5 against an Active Directory Domain using Red Hat Enterprise Linux 5 (Part 3)</a></li>
<li><a href='http://ryandlane.com/blog/2008/10/24/seamless-smartcard-login-with-pam_pkcs11-and-pam_krb5-against-an-active-directory-domain-using-red-hat-enterprise-linux-5-part-2/' rel='bookmark' title='Permanent Link: Seamless Smartcard login with pam_pkcs11, and pam_krb5 against an Active Directory Domain using Red Hat Enterprise Linux 5 (Part 2)'>Seamless Smartcard login with pam_pkcs11, and pam_krb5 against an Active Directory Domain using Red Hat Enterprise Linux 5 (Part 2)</a></li>
</ol></p><img src="http://feeds.feedburner.com/~r/RyanLanesBlog_ldap/~4/_acvl6xX91Y" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://ryandlane.com/blog/2009/06/19/ssl-replication-and-ca-trusts-in-sun-directory-server-6-x/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		<feedburner:origLink>http://ryandlane.com/blog/2009/06/19/ssl-replication-and-ca-trusts-in-sun-directory-server-6-x/</feedburner:origLink></item>
		<item>
		<title>Semi-anonymous users in MediaWiki using the LDAP Authentication extension</title>
		<link>http://feedproxy.google.com/~r/RyanLanesBlog_ldap/~3/ccp7lerT1B4/</link>
		<comments>http://ryandlane.com/blog/2009/06/18/semi-anonymous-users-in-mediawiki-using-the-ldap-authentication-extension/#comments</comments>
		<pubDate>Thu, 18 Jun 2009 15:27:53 +0000</pubDate>
		<dc:creator>Ryan Lane</dc:creator>
				<category><![CDATA[LDAP]]></category>
		<category><![CDATA[MediaWiki]]></category>
		<category><![CDATA[extension]]></category>

		<guid isPermaLink="false">http://ryandlane.com/wprdl/?p=142</guid>
		<description><![CDATA[For some corporate wikis, it is beneficial to allow anonymous edits; however, anonymous edits in MediaWiki track IP addresses, and in most corporate environments, it is simple to identify a user simply by knowing what IP address they came from. Also, most corporate environments are opposed to allowing non-authenticated write-access to any resource (for good [...]


Related posts:<ol><li><a href='http://ryandlane.com/blog/2009/07/09/using-the-ldap-authentication-plugin-for-mediawiki-%e2%80%93-the-basics-part-3/' rel='bookmark' title='Permanent Link: Using the LDAP Authentication Plugin for MediaWiki – The Basics (Part 3)'>Using the LDAP Authentication Plugin for MediaWiki – The Basics (Part 3)</a></li>
<li><a href='http://ryandlane.com/blog/2009/03/23/using-the-ldap-authentication-plugin-for-mediawiki-the-basics-part-1/' rel='bookmark' title='Permanent Link: Using the LDAP Authentication Plugin for MediaWiki &#8211; The Basics (Part 1)'>Using the LDAP Authentication Plugin for MediaWiki &#8211; The Basics (Part 1)</a></li>
<li><a href='http://ryandlane.com/blog/2009/06/16/using-the-ldap-authentication-plugin-for-mediawiki-the-basics-part-2/' rel='bookmark' title='Permanent Link: Using the LDAP Authentication Plugin for MediaWiki &#8211; The Basics (Part 2)'>Using the LDAP Authentication Plugin for MediaWiki &#8211; The Basics (Part 2)</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>For some corporate wikis, it is beneficial to allow anonymous edits; however, anonymous edits in MediaWiki track IP addresses, and in most corporate environments, it is simple to identify a user simply by knowing what IP address they came from. Also, most corporate environments are opposed to allowing non-authenticated write-access to any resource (for good reason).</p>
<p>So, if you wanted to have a wiki, like a wiki for polls, that needed some form of anonymity for users to trust using it, using the LDAP Authentication extension in a clever way can allow you to do this.</p>

<h2>Enable the extension and test authentication</h2>
<p>First and foremost, you should ensure that LDAP authentication is configured and working properly; see <a href="http://ryandlane.com/wprdl/2009/03/23/using-the-ldap-authentication-plugin-for-mediawiki-the-basics-part-1/">part 1</a> and <a href="http://ryandlane.com/wprdl/2009/06/16/using-the-ldap-authentication-plugin-for-mediawiki-the-basics-part-2/">part 2</a> of the series of articles for using the LDAP plugin for MediaWiki.</p>
<h2>Configure the SetUsernameAttributeFromLDAP hook</h2>
<p>The LDAP extension has a configuration hook that allows you to set the username used in MediaWiki to any of the user&#8217;s attributes in LDAP. We&#8217;ll use this to create a semi-anonymous username based off one of the user&#8217;s attributes.</p>
<p>Notice that I am saying <em>semi</em>-anonymous for a reason. Unless you want to create a new user for someone every time they log in, you have to create the username in such a way that it is the same every time. Put the following into the bottom of <strong>LocalSettings.php</strong>:</p>
<pre style="padding-left: 30px;">// This hook is called by the LdapAuthentication plugin. It is a configuration hook. Here we
// are specifying what attibute we want to use for a username in the wiki.
// The hook calls the function defined below.
$wgHooks['SetUsernameAttributeFromLDAP'][] = 'SetUsernameAttribute';

// This function allows you to get the username from LDAP however you need to do it.
function SetUsernameAttribute(&amp;$LDAPUsername, $info) {
    $LDAPUsername = $info[0]['cn'][0];
    $LDAPUsername = $LDAPUsername . "MySuperSecretAppendedString0230932740982738khewfjkshd";
    // How usernames are created should not be disclosed, otherwise
    // the psuedo-anonymity will be lost.
    $LDAPUsername = 'pseudo.' . md5($LDAPUsername);
    // All hooks have to return a boolean in MediaWiki
    return true;
}</pre>
<p>You should change the attribute pulled, the &#8220;MySuperSecret&#8230;&#8221; string, and (possibly) the hashing function to something else. You should probably leave the &#8220;pseudo.&#8221; string alone. Notice that it is important that whatever hash function you use creates a username that is allowed by MediaWiki; I am using md5 above for this reason.</p>
<p>As you can see, the wiki system administrator, and anyone else that knows how you are hashing the usernames, can figure out who anonymous users are. It is important to keep this information secret.</p>
<h2>Test login to ensure the username gets hashed</h2>
<p>When you log in, you should have a semi-anonymous username. Log out and log in again; you should have the same semi-anonymous username; if not, your hashing function isn&#8217;t working properly.</p>
<h2>Give your semi-anonymous user admin privileges</h2>
<p>Notice that every user, including your admin user, is now semi-anonymous. Unfortunately, this means you are no longer an admin. To fix this:</p>
<ol>
<li> Log out</li>
<li>Disable the semi-anonymous configuration</li>
<li>Log in as your admin user</li>
<li>Give admin privileges to your new semi-anonymous user</li>
<li>(Optionally) merge your old admin user with your new semi-anonymous user</li>
</ol>
<p>I should probably mention that your admin user will likely no longer be anonymous after giving yourself admin privileges (after all, most people probably know who the wiki admin is).</p>
<p>An alternative to these steps is to not hash your admin&#8217;s username in the above function.</p>
<h2>Feedback</h2>
<p>Let me know if this is or isn&#8217;t working for you, or if you have a better way of making users anonymous.</p>
<p><strong>Update (06/29/2009): </strong>Looks like this isn&#8217;t working right now unless you are using auto-authentication. I&#8217;ll try to have an update for the LDAP extension soon that&#8217;ll address this.</p>
<!-- Social Bookmarks BEGIN -->
<div class="social_bookmark">
<a><strong><em>Share:</em></strong></a>
<br />
<div class="d">
<br />
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://buzz.yahoo.com/submit?submitUrl=http%3A%2F%2Fryandlane.com%2Fblog%2F2009%2F06%2F18%2Fsemi-anonymous-users-in-mediawiki-using-the-ldap-authentication-extension%2F&amp;submitHeadline=Semi-anonymous+users+in+MediaWiki+using+the+LDAP+Authentication+extension&amp;submitSummary=" rel="nofollow" title="Add to&nbsp;Buzz"><img class="social_img" src="http://ryandlane.com/blog/wp-content/plugins/social-bookmarks/images/buzz.png" title="Add to&nbsp;Buzz" alt="Add to&nbsp;Buzz" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://del.icio.us/post?url=http%3A%2F%2Fryandlane.com%2Fblog%2F2009%2F06%2F18%2Fsemi-anonymous-users-in-mediawiki-using-the-ldap-authentication-extension%2F&amp;title=Semi-anonymous+users+in+MediaWiki+using+the+LDAP+Authentication+extension" rel="nofollow" title="Add to&nbsp;Del.icio.us"><img class="social_img" src="http://ryandlane.com/blog/wp-content/plugins/social-bookmarks/images/delicious.png" title="Add to&nbsp;Del.icio.us" alt="Add to&nbsp;Del.icio.us" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fryandlane.com%2Fblog%2F2009%2F06%2F18%2Fsemi-anonymous-users-in-mediawiki-using-the-ldap-authentication-extension%2F&amp;title=Semi-anonymous+users+in+MediaWiki+using+the+LDAP+Authentication+extension" rel="nofollow" title="Add to&nbsp;digg"><img class="social_img" src="http://ryandlane.com/blog/wp-content/plugins/social-bookmarks/images/digg.png" title="Add to&nbsp;digg" alt="Add to&nbsp;digg" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.facebook.com/sharer.php?u=http%3A%2F%2Fryandlane.com%2Fblog%2F2009%2F06%2F18%2Fsemi-anonymous-users-in-mediawiki-using-the-ldap-authentication-extension%2F" rel="nofollow" title="Add to&nbsp;Facebook"><img class="social_img" src="http://ryandlane.com/blog/wp-content/plugins/social-bookmarks/images/facebook.png" title="Add to&nbsp;Facebook" alt="Add to&nbsp;Facebook" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fryandlane.com%2Fblog%2F2009%2F06%2F18%2Fsemi-anonymous-users-in-mediawiki-using-the-ldap-authentication-extension%2F&amp;title=Semi-anonymous+users+in+MediaWiki+using+the+LDAP+Authentication+extension" rel="nofollow" title="Add to&nbsp;LinkedIn"><img class="social_img" src="http://ryandlane.com/blog/wp-content/plugins/social-bookmarks/images/linkedin.png" title="Add to&nbsp;LinkedIn" alt="Add to&nbsp;LinkedIn" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://reddit.com/submit?url=http%3A%2F%2Fryandlane.com%2Fblog%2F2009%2F06%2F18%2Fsemi-anonymous-users-in-mediawiki-using-the-ldap-authentication-extension%2F&amp;title=Semi-anonymous+users+in+MediaWiki+using+the+LDAP+Authentication+extension" rel="nofollow" title="Add to&nbsp;reddit"><img class="social_img" src="http://ryandlane.com/blog/wp-content/plugins/social-bookmarks/images/reddit.png" title="Add to&nbsp;reddit" alt="Add to&nbsp;reddit" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://slashdot.org/bookmark.pl?url=http%3A%2F%2Fryandlane.com%2Fblog%2F2009%2F06%2F18%2Fsemi-anonymous-users-in-mediawiki-using-the-ldap-authentication-extension%2F&amp;title=Semi-anonymous+users+in+MediaWiki+using+the+LDAP+Authentication+extension" rel="nofollow" title="Add to&nbsp;Slashdot"><img class="social_img" src="http://ryandlane.com/blog/wp-content/plugins/social-bookmarks/images/slashdot.png" title="Add to&nbsp;Slashdot" alt="Add to&nbsp;Slashdot" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fryandlane.com%2Fblog%2F2009%2F06%2F18%2Fsemi-anonymous-users-in-mediawiki-using-the-ldap-authentication-extension%2F&amp;title=Semi-anonymous+users+in+MediaWiki+using+the+LDAP+Authentication+extension" rel="nofollow" title="Add to&nbsp;Stumble Upon"><img class="social_img" src="http://ryandlane.com/blog/wp-content/plugins/social-bookmarks/images/stumbleupon.png" title="Add to&nbsp;Stumble Upon" alt="Add to&nbsp;Stumble Upon" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://twitter.com/home/?status=Check+out+Semi-anonymous+users+in+MediaWiki+using+the+LDAP+Authentication+extension+@+http%3A%2F%2Fryandlane.com%2Fblog%2F2009%2F06%2F18%2Fsemi-anonymous-users-in-mediawiki-using-the-ldap-authentication-extension%2F" rel="nofollow" title="Add to&nbsp;Twitter"><img class="social_img" src="http://ryandlane.com/blog/wp-content/plugins/social-bookmarks/images/twitter.png" title="Add to&nbsp;Twitter" alt="Add to&nbsp;Twitter" /></a>
<br />
</div>
</div>
<!-- Social Bookmarks END -->


<p>Related posts:<ol><li><a href='http://ryandlane.com/blog/2009/07/09/using-the-ldap-authentication-plugin-for-mediawiki-%e2%80%93-the-basics-part-3/' rel='bookmark' title='Permanent Link: Using the LDAP Authentication Plugin for MediaWiki – The Basics (Part 3)'>Using the LDAP Authentication Plugin for MediaWiki – The Basics (Part 3)</a></li>
<li><a href='http://ryandlane.com/blog/2009/03/23/using-the-ldap-authentication-plugin-for-mediawiki-the-basics-part-1/' rel='bookmark' title='Permanent Link: Using the LDAP Authentication Plugin for MediaWiki &#8211; The Basics (Part 1)'>Using the LDAP Authentication Plugin for MediaWiki &#8211; The Basics (Part 1)</a></li>
<li><a href='http://ryandlane.com/blog/2009/06/16/using-the-ldap-authentication-plugin-for-mediawiki-the-basics-part-2/' rel='bookmark' title='Permanent Link: Using the LDAP Authentication Plugin for MediaWiki &#8211; The Basics (Part 2)'>Using the LDAP Authentication Plugin for MediaWiki &#8211; The Basics (Part 2)</a></li>
</ol></p><img src="http://feeds.feedburner.com/~r/RyanLanesBlog_ldap/~4/ccp7lerT1B4" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://ryandlane.com/blog/2009/06/18/semi-anonymous-users-in-mediawiki-using-the-ldap-authentication-extension/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		<feedburner:origLink>http://ryandlane.com/blog/2009/06/18/semi-anonymous-users-in-mediawiki-using-the-ldap-authentication-extension/</feedburner:origLink></item>
		<item>
		<title>Using the LDAP Authentication Plugin for MediaWiki – The Basics (Part 2)</title>
		<link>http://feedproxy.google.com/~r/RyanLanesBlog_ldap/~3/_rYsACnH8_I/</link>
		<comments>http://ryandlane.com/blog/2009/06/16/using-the-ldap-authentication-plugin-for-mediawiki-the-basics-part-2/#comments</comments>
		<pubDate>Tue, 16 Jun 2009 22:26:30 +0000</pubDate>
		<dc:creator>Ryan Lane</dc:creator>
				<category><![CDATA[LDAP]]></category>
		<category><![CDATA[MediaWiki]]></category>

		<guid isPermaLink="false">http://ryandlane.com/wprdl/?p=49</guid>
		<description><![CDATA[In part 1 of this series, I discussed basic password authentication for Active Directory (AD). In this article, I will discuss basic password authentication for LDAP domains with the posix schema. For basic password authentication against an LDAP domain with the posix schema, you need to configure three or four things: Domain name Server names [...]


Related posts:<ol><li><a href='http://ryandlane.com/blog/2009/03/23/using-the-ldap-authentication-plugin-for-mediawiki-the-basics-part-1/' rel='bookmark' title='Permanent Link: Using the LDAP Authentication Plugin for MediaWiki &#8211; The Basics (Part 1)'>Using the LDAP Authentication Plugin for MediaWiki &#8211; The Basics (Part 1)</a></li>
<li><a href='http://ryandlane.com/blog/2009/07/09/using-the-ldap-authentication-plugin-for-mediawiki-%e2%80%93-the-basics-part-3/' rel='bookmark' title='Permanent Link: Using the LDAP Authentication Plugin for MediaWiki – The Basics (Part 3)'>Using the LDAP Authentication Plugin for MediaWiki – The Basics (Part 3)</a></li>
<li><a href='http://ryandlane.com/blog/2009/07/28/opensso-web-agent-conflicts-with-the-mediawiki-parser-and-a-workaround/' rel='bookmark' title='Permanent Link: OpenSSO web agent conflicts with the MediaWiki parser, and a workaround'>OpenSSO web agent conflicts with the MediaWiki parser, and a workaround</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>In <a href="http://ryandlane.com/wprdl/2009/03/23/using-the-ldap-authentication-plugin-for-mediawiki-the-basics-part-1/">part 1</a> of this series, I discussed basic password authentication for Active Directory (AD). In this article, I will discuss basic password authentication for LDAP domains with the posix schema.</p>
<p>For basic password authentication against an LDAP domain with the posix schema, you need to configure three or four things:</p>
<ol>
<li>Domain name</li>
<li>Server names</li>
<li>How to bind to the LDAP servers</li>
<li>The proxy user used to find your user accounts (optional depending on your environment)</li>
</ol>

<h2>Prerequisites</h2>
<p>Please see and complete the &#8220;Create a local sysop&#8221;, and &#8220;Enabling the plugin&#8221; sections of <a href="http://ryandlane.com/wprdl/2009/03/23/using-the-ldap-authentication-plugin-for-mediawiki-the-basics-part-1/">part 1</a> before proceeding.</p>
<h2>Configuring the plugin</h2>
<h3>Setting the domain name</h3>
<p>The domain name is used for all of the LDAP configuration settings, and is also the domain name visible to users when logging in. It is recommended to use the short name of your LDAP domain as the domain name. For example, if your LDAP domain is <strong>testposix.example.com</strong>, then you should use <strong>testposix</strong> as your domain name. We will use <strong>testposix</strong> for the examples in this post.</p>
<p>Place the following in <strong>LocalSettings.php</strong> file to set the domain name:</p>
<pre style="padding-left: 30px;">$wgLDAPDomainNames = array( "testposix" );</pre>
<h3>Setting the server names</h3>
<p>The plugin needs to know the fully qualified domain name (FQDN) of each of your LDAP servers to contact. You may add multiple servers, delimited by spaces, for server failover.</p>
<p>Place the following in <strong>LocalSettings.php</strong> to set the server names:</p>
<pre style="padding-left: 30px;">$wgLDAPServerNames = array( "testposix" =&gt; "ldapserver1.testposix.example.com ldapserver2.testposix.example.com" );</pre>
<h3>Telling the plugin how to bind to the LDAP server</h3>
<p>Binding to the LDAP server can be straightforward if your Directory Information Tree (DIT) is simple; by simple, I mean your users are in ou=people, and they all have the same naming attribute (such as <strong>uid</strong>). To bind to this type of DIT, you simply need a bind DN format, and a password. You can tell the plugin to create the bind dn by adding the following in <strong>LocalSettings.php</strong>:</p>
<pre style="padding-left: 30px;">$wgLDAPSearchStrings = array( "testposix" =&gt; "uid=USER-NAME,ou=people,dc=testposix,dc=example,dc=com";</pre>
<p>Notice that <strong>USER-NAME</strong> is a special string, and should not be modified. When the user logs in, <strong>USER-NAME</strong> will be replaced with whatever username is used.</p>
<p>If your DIT is not flat, or your naming attributes aren&#8217;t the same for all users, you&#8217;ll need to configure the plugin to first find the user&#8217;s DN, then bind as that user. To do this, you&#8217;ll need a search attribute, a base DN, and optionally a proxy agent and proxy agent password.</p>
<p>Your search attribute must be an attribute that all users share, and should preferably be a unique attribute; we&#8217;ll use <strong>uid</strong> for this. Your base DN must be at a node in your tree that is a parent to all of your users; we&#8217;ll use <strong>dc=testposix,dc=example,dc=com</strong> for this (the root DN). If your directory server allows users to be searched anonymously (which is abnormal), you don&#8217;t need to specify and proxy agent or proxy agent password. If your directory server requires authenticated searches (normal), you can specify a proxy agent and proxy agent password; we&#8217;ll use <strong>cn=proxyagent,ou=profile,dc=testposix,dc=example,dc=com</strong> and &#8220;<strong>T3stP0$ixP@$$</strong>&#8221; for this. Notice that you should give the bare minimum privileges needed to the proxy agent!</p>
<p>You can set these options by placing the following into <strong>LocalSettings.php</strong>:</p>
<pre style="padding-left: 30px;"><span>$wgLDAPSearchAttributes</span> = <span>array</span><span>(</span> "testposix" =&gt; "uid" );
$wgLDAPBaseDNs = array( "testposix" =&gt; "dc=testposix,dc=example,dc=com" );
$wgLDAPProxyAgent = array( "testposix" =&gt; "cn=proxyagent,ou=profile,dc=testposix,dc=example,dc=com" );
$wgLDAPProxyAgentPassword = array( "testposix" =&gt; "T3stP0$ixP@$$" );</pre>
<p>By default the LDAP plugin is set to bind using encryption. Specifically, the plugin defaults to <strong>tls</strong> using LDAP (port 389). <strong></strong> The supported encryption types are <strong>clear</strong>, <strong>tls</strong>, and <strong>ssl</strong>. Most posix LDAP servers support TLS and SSL. It is recommended to keep encryption enabled. If you need to switch encryption types, you can use the following option in <strong>LocalSettings.php</strong>:</p>
<pre style="padding-left: 30px;">$wgLDAPEncryptionType = array( "testposix" =&gt; "ssl" );</pre>
<h2>Configuring the server</h2>
<h3>Configuring the SSL trust</h3>
<p>For <strong>ssl</strong> to work properly, it is important to ensure the LDAP client (the web server) trusts the root Certificate Authority (CA) of the LDAP server. If your organization is using a third party CA that is in most normal trust lists (like in IE or Firefox), this step can likely be skipped. If your LDAP servers are using self signed certificates or a local CA, this step is needed.</p>
<p>You can find out which CA issued the LDAP server’s certificate using openssl. Run the following command:</p>
<pre style="padding-left: 30px;">openssl s_client -connect ldapserver1.testposix.example.com:636 | egrep "subject|issuer"</pre>
<p>If the subject and the issuer are the same, the certificate is self signed. If the subject and issuer are not the same, the certificate was signed by a CA. If the CA is local, ask someone in your organization for a copy of the CA certificate. If the certificate is self signed, you can get the certificate by running the previous command without the grep:</p>
<pre style="padding-left: 30px;">openssl s_client -connect ldapserver1.testposix.example.com:636</pre>
<p>Copy everything in between, and including:</p>
<pre style="padding-left: 30px;">-----BEGIN CERTIFICATE-----</pre>
<p>and:</p>
<pre style="padding-left: 30px;">-----END CERTIFICATE-----</pre>
<p>Paste the text into a file, and place the file wherever your OS normally stores its CA certificates; Red Hat Enterprise Linux 5 and newer versions of Fedora place these in /etc/pki/tls/certs.</p>
<p>Now place the following into <strong>/etc/openldap/ldap.conf</strong>:</p>
<pre style="padding-left: 30px;">TLS_CACERT     &lt;pathToCACert&gt;
TLS_CACERTFILE &lt;pathToCACert&gt;</pre>
<p>Restart your web server for this to take effect.</p>
<h2>Test your configuration by logging in with an LDAP user</h2>
<p>Everything should be working at this point. If you have any questions, you should post them on the <a href="http://www.mediawiki.org/wiki/Extension_talk:LDAP_Authentication">discussion page for the plugin</a> on mediawiki.org, or leave me a comment (the former is preferred).</p>
<!-- Social Bookmarks BEGIN -->
<div class="social_bookmark">
<a><strong><em>Share:</em></strong></a>
<br />
<div class="d">
<br />
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://buzz.yahoo.com/submit?submitUrl=http%3A%2F%2Fryandlane.com%2Fblog%2F2009%2F06%2F16%2Fusing-the-ldap-authentication-plugin-for-mediawiki-the-basics-part-2%2F&amp;submitHeadline=Using+the+LDAP+Authentication+Plugin+for+MediaWiki+%26%238211%3B+The+Basics+%28Part+2%29&amp;submitSummary=" rel="nofollow" title="Add to&nbsp;Buzz"><img class="social_img" src="http://ryandlane.com/blog/wp-content/plugins/social-bookmarks/images/buzz.png" title="Add to&nbsp;Buzz" alt="Add to&nbsp;Buzz" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://del.icio.us/post?url=http%3A%2F%2Fryandlane.com%2Fblog%2F2009%2F06%2F16%2Fusing-the-ldap-authentication-plugin-for-mediawiki-the-basics-part-2%2F&amp;title=Using+the+LDAP+Authentication+Plugin+for+MediaWiki+%26%238211%3B+The+Basics+%28Part+2%29" rel="nofollow" title="Add to&nbsp;Del.icio.us"><img class="social_img" src="http://ryandlane.com/blog/wp-content/plugins/social-bookmarks/images/delicious.png" title="Add to&nbsp;Del.icio.us" alt="Add to&nbsp;Del.icio.us" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fryandlane.com%2Fblog%2F2009%2F06%2F16%2Fusing-the-ldap-authentication-plugin-for-mediawiki-the-basics-part-2%2F&amp;title=Using+the+LDAP+Authentication+Plugin+for+MediaWiki+%26%238211%3B+The+Basics+%28Part+2%29" rel="nofollow" title="Add to&nbsp;digg"><img class="social_img" src="http://ryandlane.com/blog/wp-content/plugins/social-bookmarks/images/digg.png" title="Add to&nbsp;digg" alt="Add to&nbsp;digg" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.facebook.com/sharer.php?u=http%3A%2F%2Fryandlane.com%2Fblog%2F2009%2F06%2F16%2Fusing-the-ldap-authentication-plugin-for-mediawiki-the-basics-part-2%2F" rel="nofollow" title="Add to&nbsp;Facebook"><img class="social_img" src="http://ryandlane.com/blog/wp-content/plugins/social-bookmarks/images/facebook.png" title="Add to&nbsp;Facebook" alt="Add to&nbsp;Facebook" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fryandlane.com%2Fblog%2F2009%2F06%2F16%2Fusing-the-ldap-authentication-plugin-for-mediawiki-the-basics-part-2%2F&amp;title=Using+the+LDAP+Authentication+Plugin+for+MediaWiki+%26%238211%3B+The+Basics+%28Part+2%29" rel="nofollow" title="Add to&nbsp;LinkedIn"><img class="social_img" src="http://ryandlane.com/blog/wp-content/plugins/social-bookmarks/images/linkedin.png" title="Add to&nbsp;LinkedIn" alt="Add to&nbsp;LinkedIn" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://reddit.com/submit?url=http%3A%2F%2Fryandlane.com%2Fblog%2F2009%2F06%2F16%2Fusing-the-ldap-authentication-plugin-for-mediawiki-the-basics-part-2%2F&amp;title=Using+the+LDAP+Authentication+Plugin+for+MediaWiki+%26%238211%3B+The+Basics+%28Part+2%29" rel="nofollow" title="Add to&nbsp;reddit"><img class="social_img" src="http://ryandlane.com/blog/wp-content/plugins/social-bookmarks/images/reddit.png" title="Add to&nbsp;reddit" alt="Add to&nbsp;reddit" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://slashdot.org/bookmark.pl?url=http%3A%2F%2Fryandlane.com%2Fblog%2F2009%2F06%2F16%2Fusing-the-ldap-authentication-plugin-for-mediawiki-the-basics-part-2%2F&amp;title=Using+the+LDAP+Authentication+Plugin+for+MediaWiki+%26%238211%3B+The+Basics+%28Part+2%29" rel="nofollow" title="Add to&nbsp;Slashdot"><img class="social_img" src="http://ryandlane.com/blog/wp-content/plugins/social-bookmarks/images/slashdot.png" title="Add to&nbsp;Slashdot" alt="Add to&nbsp;Slashdot" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fryandlane.com%2Fblog%2F2009%2F06%2F16%2Fusing-the-ldap-authentication-plugin-for-mediawiki-the-basics-part-2%2F&amp;title=Using+the+LDAP+Authentication+Plugin+for+MediaWiki+%26%238211%3B+The+Basics+%28Part+2%29" rel="nofollow" title="Add to&nbsp;Stumble Upon"><img class="social_img" src="http://ryandlane.com/blog/wp-content/plugins/social-bookmarks/images/stumbleupon.png" title="Add to&nbsp;Stumble Upon" alt="Add to&nbsp;Stumble Upon" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://twitter.com/home/?status=Check+out+Using+the+LDAP+Authentication+Plugin+for+MediaWiki+%26%238211%3B+The+Basics+%28Part+2%29+@+http%3A%2F%2Fryandlane.com%2Fblog%2F2009%2F06%2F16%2Fusing-the-ldap-authentication-plugin-for-mediawiki-the-basics-part-2%2F" rel="nofollow" title="Add to&nbsp;Twitter"><img class="social_img" src="http://ryandlane.com/blog/wp-content/plugins/social-bookmarks/images/twitter.png" title="Add to&nbsp;Twitter" alt="Add to&nbsp;Twitter" /></a>
<br />
</div>
</div>
<!-- Social Bookmarks END -->


<p>Related posts:<ol><li><a href='http://ryandlane.com/blog/2009/03/23/using-the-ldap-authentication-plugin-for-mediawiki-the-basics-part-1/' rel='bookmark' title='Permanent Link: Using the LDAP Authentication Plugin for MediaWiki &#8211; The Basics (Part 1)'>Using the LDAP Authentication Plugin for MediaWiki &#8211; The Basics (Part 1)</a></li>
<li><a href='http://ryandlane.com/blog/2009/07/09/using-the-ldap-authentication-plugin-for-mediawiki-%e2%80%93-the-basics-part-3/' rel='bookmark' title='Permanent Link: Using the LDAP Authentication Plugin for MediaWiki – The Basics (Part 3)'>Using the LDAP Authentication Plugin for MediaWiki – The Basics (Part 3)</a></li>
<li><a href='http://ryandlane.com/blog/2009/07/28/opensso-web-agent-conflicts-with-the-mediawiki-parser-and-a-workaround/' rel='bookmark' title='Permanent Link: OpenSSO web agent conflicts with the MediaWiki parser, and a workaround'>OpenSSO web agent conflicts with the MediaWiki parser, and a workaround</a></li>
</ol></p><img src="http://feeds.feedburner.com/~r/RyanLanesBlog_ldap/~4/_rYsACnH8_I" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://ryandlane.com/blog/2009/06/16/using-the-ldap-authentication-plugin-for-mediawiki-the-basics-part-2/feed/</wfw:commentRss>
		<slash:comments>17</slash:comments>
		<feedburner:origLink>http://ryandlane.com/blog/2009/06/16/using-the-ldap-authentication-plugin-for-mediawiki-the-basics-part-2/</feedburner:origLink></item>
		<item>
		<title>Using the LDAP Authentication Plugin for MediaWiki – The Basics (Part 1)</title>
		<link>http://feedproxy.google.com/~r/RyanLanesBlog_ldap/~3/IGmMeJcgZ-w/</link>
		<comments>http://ryandlane.com/blog/2009/03/23/using-the-ldap-authentication-plugin-for-mediawiki-the-basics-part-1/#comments</comments>
		<pubDate>Mon, 23 Mar 2009 18:16:02 +0000</pubDate>
		<dc:creator>Ryan Lane</dc:creator>
				<category><![CDATA[LDAP]]></category>
		<category><![CDATA[MediaWiki]]></category>

		<guid isPermaLink="false">http://ryandlane.com/wprdl/?p=41</guid>
		<description><![CDATA[Configuring the LDAP Authentication plugin for MediaWiki can be a daunting task. In this series of posts, I&#8217;ll go over the basics of configuring the plugin for common environments. In a later series of posts, I&#8217;ll go into each environment in detail. Part 1 will discuss basic password authentication for Active Directory (AD). Part 2 [...]


Related posts:<ol><li><a href='http://ryandlane.com/blog/2009/06/16/using-the-ldap-authentication-plugin-for-mediawiki-the-basics-part-2/' rel='bookmark' title='Permanent Link: Using the LDAP Authentication Plugin for MediaWiki &#8211; The Basics (Part 2)'>Using the LDAP Authentication Plugin for MediaWiki &#8211; The Basics (Part 2)</a></li>
<li><a href='http://ryandlane.com/blog/2009/07/09/using-the-ldap-authentication-plugin-for-mediawiki-%e2%80%93-the-basics-part-3/' rel='bookmark' title='Permanent Link: Using the LDAP Authentication Plugin for MediaWiki – The Basics (Part 3)'>Using the LDAP Authentication Plugin for MediaWiki – The Basics (Part 3)</a></li>
<li><a href='http://ryandlane.com/blog/2009/06/18/semi-anonymous-users-in-mediawiki-using-the-ldap-authentication-extension/' rel='bookmark' title='Permanent Link: Semi-anonymous users in MediaWiki using the LDAP Authentication extension'>Semi-anonymous users in MediaWiki using the LDAP Authentication extension</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Configuring the LDAP Authentication plugin for MediaWiki can be a daunting task. In this series of posts, I&#8217;ll go over the basics of configuring the plugin for common environments. In a later series of posts, I&#8217;ll go into each environment in detail.</p>
<p>Part 1 will discuss basic password authentication for Active Directory (AD). Part 2 will discuss basic password authentication for LDAP domains with the posix schema. Part 3 will discuss enabling group restrictions and synchronization, and retrieving preferences for AD. Part 4 will discuss group restrictions and synchronization, and retrieving preferences for LDAP domains with the posix schema.</p>
<p>Basic MediaWiki administration experience is assumed. This series of posts should only be considered current for version 1.2a or 1.2b of the LDAP plugin.<br />
</p>
<h2>Create a local sysop</h2>
<p>Before enabling the plugin, you should create a user in the local wiki database that exists in AD, and promote that user to sysop. After the plugin is enabled, you will not be able to log in as any user who does not exist in AD.</p>
<h2>Enabling the plugin</h2>
<p>To enable the plugin, first download the <a href="http://www.mediawiki.org/wiki/Extension:LDAP_Authentication#Current_version">current stable version</a>, and place it at <strong>$IP/extensions/LdapAuthentication/LdapAuthentication.php</strong>. After downloading the plugin, place the following in <strong>LocalSettings.php</strong>:</p>
<pre style="padding-left: 30px;">require_once( "$IP/extensions/LdapAuthentication/LdapAuthentication.php" );
$wgAuth = new LdapAuthenticationPlugin();</pre>
<h2>Configuring the plugin</h2>
<p>For basic password authentication against an AD domain, you need to configure three things:</p>
<ol>
<li>Domain name</li>
<li>Server names</li>
<li>How to bind to the AD servers</li>
</ol>
<h3>Setting the domain name</h3>
<p>The domain name is used for all of the LDAP configuration settings, and is also the domain name visible to users when logging in. It is recommended to use the short name of your AD domain as the domain name. For example, if your AD domain is <strong>TESTAD.EXAMPLE.COM</strong>, then you should use <strong>TESTAD</strong> as your domain name. We will use <strong>TESTAD</strong> for the examples in this post.</p>
<p>Place the following in <strong>LocalSettings.php</strong> file to set the domain name:</p>
<pre style="padding-left: 30px;">$wgLDAPDomainNames = array( "TESTAD" );</pre>
<h3>Setting the server names</h3>
<p>The plugin needs to know the fully qualified domain name (FQDN) of each of your AD servers to contact. Currently, the plugin can not do automatic domain discovery. You may add multiple servers, delimited by spaces, for server failover.</p>
<p>Place the following in <strong>LocalSettings.php</strong> to set the server names:</p>
<pre style="padding-left: 30px;">$wgLDAPServerNames = array( "TESTAD" =&gt; "adserver1.testad.example.com adserver2.testad.example.com" );</pre>
<h3>Telling the plugin how to bind to the AD server</h3>
<p>Binding to AD is straightforward; you simply tell the server the domain, username, and password. AD takes the domain and the username in either of the following formats: <strong>username@DOMAIN</strong> or <strong>DOMAINusername</strong>. The LDAP plugin supports either of these formats; for this example we&#8217;ll use the former.</p>
<p>To specify the format to bind with, place the following into <strong>LocalSettings.php</strong>:</p>
<pre style="padding-left: 30px;">$wgLDAPSearchStrings = array( "TESTAD" =&gt; "USER-NAME@TESTAD" );</pre>
<p>Notice that <strong>USER-NAME</strong> is a special string, and should not be modified. When the user logs in, <strong>USER-NAME</strong> will be replaced with whatever username is used.</p>
<p>By default the LDAP plugin is set to bind using encryption. Specifically, the plugin defaults to <strong>tls</strong> using LDAP (port 389). AD doesn&#8217;t support <strong>tls</strong>, so the encryption type needs to be changed. The supported encryption types are <strong>clear</strong>, <strong>tls</strong>, and <strong>ssl</strong>. AD doesn&#8217;t allow clear text binds by default, and only supports the <strong>ssl</strong> encryption type using LDAPS (port 636). If you wish to use clear text binds, you&#8217;ll need to change your AD security settings (not recommended).</p>
<p>To change the encryption type, place the following into <strong>LocalSettings.php</strong>:</p>
<pre style="padding-left: 30px;">$wgLDAPEncryptionType = array( "TESTAD" =&gt; "ssl" );</pre>
<h2>Configuring the server</h2>
<h3>Configuring the SSL trust</h3>
<p>For <strong>ssl</strong> to work properly, it is important to ensure the LDAP client (the web server) trusts the root Certificate Authority (CA) of the AD server. If your organization is using a third party CA that is in most normal trust lists (like in IE or Firefox), this step can likely be skipped. If your AD servers are using self signed certificates or a local CA, this step is needed.</p>
<p>You can find out which CA issued the AD server&#8217;s certificate using openssl. Run the following command:</p>
<pre style="padding-left: 30px;">openssl s_client -connect adserver1.testad.example.com:636 | egrep "subject|issuer"</pre>
<p>If the subject and the issuer are the same, the certificate is self signed. If the subject and issuer are not the same, the certificate was signed by a CA. If the CA is local, ask someone in your organization for a copy of the CA certificate. If the certificate is self signed, you can get the certificate by running the previous command without the grep:</p>
<pre style="padding-left: 30px;">openssl s_client -connect adserver1.testad.example.com:636</pre>
<p>Copy everything in between, and including:</p>
<pre style="padding-left: 30px;">-----BEGIN CERTIFICATE-----</pre>
<p>and:</p>
<pre style="padding-left: 30px;">-----END CERTIFICATE-----</pre>
<p>Paste the text into a file, and place the file wherever your OS normally stores its CA certificates; Red Hat Enterprise Linux 5 and newer versions of Fedora place these in /etc/pki/tls/certs.</p>
<p>Now place the following into <strong>/etc/openldap/ldap.conf</strong>:</p>
<pre style="padding-left: 30px;">TLS_CACERT     &lt;pathToCACert&gt;
TLS_CACERTFILE &lt;pathToCACert&gt;</pre>
<p>Restart your web server for this to take effect.</p>
<h2>Test your configuration by logging in with an AD user</h2>
<p>Everything should be working at this point. If you have any questions, you should post them on the <a href="http://www.mediawiki.org/wiki/Extension_talk:LDAP_Authentication">discussion page for the plugin</a> on mediawiki.org, or leave me a comment (the former is preferred).</p>
<!-- Social Bookmarks BEGIN -->
<div class="social_bookmark">
<a><strong><em>Share:</em></strong></a>
<br />
<div class="d">
<br />
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://buzz.yahoo.com/submit?submitUrl=http%3A%2F%2Fryandlane.com%2Fblog%2F2009%2F03%2F23%2Fusing-the-ldap-authentication-plugin-for-mediawiki-the-basics-part-1%2F&amp;submitHeadline=Using+the+LDAP+Authentication+Plugin+for+MediaWiki+%26%238211%3B+The+Basics+%28Part+1%29&amp;submitSummary=" rel="nofollow" title="Add to&nbsp;Buzz"><img class="social_img" src="http://ryandlane.com/blog/wp-content/plugins/social-bookmarks/images/buzz.png" title="Add to&nbsp;Buzz" alt="Add to&nbsp;Buzz" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://del.icio.us/post?url=http%3A%2F%2Fryandlane.com%2Fblog%2F2009%2F03%2F23%2Fusing-the-ldap-authentication-plugin-for-mediawiki-the-basics-part-1%2F&amp;title=Using+the+LDAP+Authentication+Plugin+for+MediaWiki+%26%238211%3B+The+Basics+%28Part+1%29" rel="nofollow" title="Add to&nbsp;Del.icio.us"><img class="social_img" src="http://ryandlane.com/blog/wp-content/plugins/social-bookmarks/images/delicious.png" title="Add to&nbsp;Del.icio.us" alt="Add to&nbsp;Del.icio.us" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fryandlane.com%2Fblog%2F2009%2F03%2F23%2Fusing-the-ldap-authentication-plugin-for-mediawiki-the-basics-part-1%2F&amp;title=Using+the+LDAP+Authentication+Plugin+for+MediaWiki+%26%238211%3B+The+Basics+%28Part+1%29" rel="nofollow" title="Add to&nbsp;digg"><img class="social_img" src="http://ryandlane.com/blog/wp-content/plugins/social-bookmarks/images/digg.png" title="Add to&nbsp;digg" alt="Add to&nbsp;digg" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.facebook.com/sharer.php?u=http%3A%2F%2Fryandlane.com%2Fblog%2F2009%2F03%2F23%2Fusing-the-ldap-authentication-plugin-for-mediawiki-the-basics-part-1%2F" rel="nofollow" title="Add to&nbsp;Facebook"><img class="social_img" src="http://ryandlane.com/blog/wp-content/plugins/social-bookmarks/images/facebook.png" title="Add to&nbsp;Facebook" alt="Add to&nbsp;Facebook" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fryandlane.com%2Fblog%2F2009%2F03%2F23%2Fusing-the-ldap-authentication-plugin-for-mediawiki-the-basics-part-1%2F&amp;title=Using+the+LDAP+Authentication+Plugin+for+MediaWiki+%26%238211%3B+The+Basics+%28Part+1%29" rel="nofollow" title="Add to&nbsp;LinkedIn"><img class="social_img" src="http://ryandlane.com/blog/wp-content/plugins/social-bookmarks/images/linkedin.png" title="Add to&nbsp;LinkedIn" alt="Add to&nbsp;LinkedIn" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://reddit.com/submit?url=http%3A%2F%2Fryandlane.com%2Fblog%2F2009%2F03%2F23%2Fusing-the-ldap-authentication-plugin-for-mediawiki-the-basics-part-1%2F&amp;title=Using+the+LDAP+Authentication+Plugin+for+MediaWiki+%26%238211%3B+The+Basics+%28Part+1%29" rel="nofollow" title="Add to&nbsp;reddit"><img class="social_img" src="http://ryandlane.com/blog/wp-content/plugins/social-bookmarks/images/reddit.png" title="Add to&nbsp;reddit" alt="Add to&nbsp;reddit" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://slashdot.org/bookmark.pl?url=http%3A%2F%2Fryandlane.com%2Fblog%2F2009%2F03%2F23%2Fusing-the-ldap-authentication-plugin-for-mediawiki-the-basics-part-1%2F&amp;title=Using+the+LDAP+Authentication+Plugin+for+MediaWiki+%26%238211%3B+The+Basics+%28Part+1%29" rel="nofollow" title="Add to&nbsp;Slashdot"><img class="social_img" src="http://ryandlane.com/blog/wp-content/plugins/social-bookmarks/images/slashdot.png" title="Add to&nbsp;Slashdot" alt="Add to&nbsp;Slashdot" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fryandlane.com%2Fblog%2F2009%2F03%2F23%2Fusing-the-ldap-authentication-plugin-for-mediawiki-the-basics-part-1%2F&amp;title=Using+the+LDAP+Authentication+Plugin+for+MediaWiki+%26%238211%3B+The+Basics+%28Part+1%29" rel="nofollow" title="Add to&nbsp;Stumble Upon"><img class="social_img" src="http://ryandlane.com/blog/wp-content/plugins/social-bookmarks/images/stumbleupon.png" title="Add to&nbsp;Stumble Upon" alt="Add to&nbsp;Stumble Upon" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://twitter.com/home/?status=Check+out+Using+the+LDAP+Authentication+Plugin+for+MediaWiki+%26%238211%3B+The+Basics+%28Part+1%29+@+http%3A%2F%2Fryandlane.com%2Fblog%2F2009%2F03%2F23%2Fusing-the-ldap-authentication-plugin-for-mediawiki-the-basics-part-1%2F" rel="nofollow" title="Add to&nbsp;Twitter"><img class="social_img" src="http://ryandlane.com/blog/wp-content/plugins/social-bookmarks/images/twitter.png" title="Add to&nbsp;Twitter" alt="Add to&nbsp;Twitter" /></a>
<br />
</div>
</div>
<!-- Social Bookmarks END -->


<p>Related posts:<ol><li><a href='http://ryandlane.com/blog/2009/06/16/using-the-ldap-authentication-plugin-for-mediawiki-the-basics-part-2/' rel='bookmark' title='Permanent Link: Using the LDAP Authentication Plugin for MediaWiki &#8211; The Basics (Part 2)'>Using the LDAP Authentication Plugin for MediaWiki &#8211; The Basics (Part 2)</a></li>
<li><a href='http://ryandlane.com/blog/2009/07/09/using-the-ldap-authentication-plugin-for-mediawiki-%e2%80%93-the-basics-part-3/' rel='bookmark' title='Permanent Link: Using the LDAP Authentication Plugin for MediaWiki – The Basics (Part 3)'>Using the LDAP Authentication Plugin for MediaWiki – The Basics (Part 3)</a></li>
<li><a href='http://ryandlane.com/blog/2009/06/18/semi-anonymous-users-in-mediawiki-using-the-ldap-authentication-extension/' rel='bookmark' title='Permanent Link: Semi-anonymous users in MediaWiki using the LDAP Authentication extension'>Semi-anonymous users in MediaWiki using the LDAP Authentication extension</a></li>
</ol></p><img src="http://feeds.feedburner.com/~r/RyanLanesBlog_ldap/~4/IGmMeJcgZ-w" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://ryandlane.com/blog/2009/03/23/using-the-ldap-authentication-plugin-for-mediawiki-the-basics-part-1/feed/</wfw:commentRss>
		<slash:comments>77</slash:comments>
		<feedburner:origLink>http://ryandlane.com/blog/2009/03/23/using-the-ldap-authentication-plugin-for-mediawiki-the-basics-part-1/</feedburner:origLink></item>
		<item>
		<title>Seamless Smartcard login with pam_pkcs11, and pam_krb5 against an Active Directory Domain using Red Hat Enterprise Linux 5 (Part 3)</title>
		<link>http://feedproxy.google.com/~r/RyanLanesBlog_ldap/~3/ncL-uYmAwt0/</link>
		<comments>http://ryandlane.com/blog/2008/12/08/seamless-smartcard-login-with-pam_pkcs11-and-pam_krb5-against-an-active-directory-domain-using-red-hat-enterprise-linux-5-part-3/#comments</comments>
		<pubDate>Mon, 08 Dec 2008 23:28:24 +0000</pubDate>
		<dc:creator>Ryan Lane</dc:creator>
				<category><![CDATA[LDAP]]></category>
		<category><![CDATA[pki]]></category>

		<guid isPermaLink="false">http://ryandlane.com/wprdl/?p=34</guid>
		<description><![CDATA[In part 1 I discussed how to configure NSS and OpenSSL. In part 2, I discussed how to configure pam_pkcs11 and how to test a smartcard against the NSS database we set up. In this part, I&#8217;ll discuss how to add pam_krb5 into the mix to automatically get a Kerberos ticket from an Active Directory [...]


Related posts:<ol><li><a href='http://ryandlane.com/blog/2008/10/24/seamless-smartcard-login-with-pam_pkcs11-and-pam_krb5-against-an-active-directory-domain-using-red-hat-enterprise-linux-5-part-2/' rel='bookmark' title='Permanent Link: Seamless Smartcard login with pam_pkcs11, and pam_krb5 against an Active Directory Domain using Red Hat Enterprise Linux 5 (Part 2)'>Seamless Smartcard login with pam_pkcs11, and pam_krb5 against an Active Directory Domain using Red Hat Enterprise Linux 5 (Part 2)</a></li>
<li><a href='http://ryandlane.com/blog/2008/10/21/seamless-smartcard-login-with-pam_pkcs11-and-pam_krb5-against-an-active-directory-domain-using-red-hat-enterprise-linux-5-part-1/' rel='bookmark' title='Permanent Link: Seamless Smartcard login with pam_pkcs11, and pam_krb5 against an Active Directory Domain using Red Hat Enterprise Linux 5 (Part 1)'>Seamless Smartcard login with pam_pkcs11, and pam_krb5 against an Active Directory Domain using Red Hat Enterprise Linux 5 (Part 1)</a></li>
<li><a href='http://ryandlane.com/blog/2008/12/08/using-nss-with-openssh-for-smart-card-login/' rel='bookmark' title='Permanent Link: Using NSS with OpenSSH for Smart Card Login'>Using NSS with OpenSSH for Smart Card Login</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>In <a href="../2008/10/21/seamless-smartcard-login-with-pam_pkcs11-and-pam_krb5-against-an-active-directory-domain-using-red-hat-enterprise-linux-5-part-1/">part 1</a> I discussed how to configure NSS and OpenSSL. In <a href="http://ryandlane.com/wprdl/2008/10/24/seamless-smartcard-login-with-pam_pkcs11-and-pam_krb5-against-an-active-directory-domain-using-red-hat-enterprise-linux-5-part-2/">part 2</a>, I discussed how to configure pam_pkcs11 and how to test a smartcard against the NSS database we set up. In this part, I&#8217;ll discuss how to add pam_krb5 into the mix to automatically get a Kerberos ticket from an Active Directory domain using PKINIT.</p>
<p>Notice that this post will discuss a package that is yet to be officially released by Red Hat. Whenever this is officially released, it may have different configuration options, or different functionality. I&#8217;ll update this post at that time.<br />
</p>
<h2>Configure the krb5.conf</h2>
<p>Add the following information into the <tt>[libdefaults]</tt> section:</p>
<pre>        default_realm = EXAMPLE.COM</pre>
<p>This tells the Kerberos client that by default, it will use the EXAMPLE.COM realm unless otherwise specified. If you are in an environment where another Kerberos realm is supposed to be your default, you can skip the <tt>[libdefaults]</tt> section. Later, I&#8217;ll show you how pam_krb5 can work without this configuration setting.</p>
<p>Add the following information into the <tt>[realms]</tt> section:</p>
<pre>        EXAMPLE.COM = {
                kdc = kdc1.example.com
                kdc = kdc2.example.com
                admin_server = kdc1.example.com
                default_domain = example.com
        }</pre>
<p>This tells the Kerberos client about the EXAMPLE.COM domain; specifically: what the servers are, and the default domain.</p>
<p>Add the following into the <tt>[domain_realm]</tt> section:</p>
<pre>        .example.com = EXAMPLE.COM</pre>
<p>This maps the DNS domain name to the Kerberos domain name; if you have service records for your Active Directory domain, this may not be necessary.</p>
<p>Add the following into the <tt>[appdefaults]</tt> section:</p>
<pre>        allow_pkinit = yes
        pkinit = {
                client_ca_certificate_pool = /etc/pki/tls/certs
                EXAMPLE.COM = {
                        trusted_guid = f7:11:44:70:97:a8:40:d8:bb:a1:b8:7f:4e:a2:ed:fe 51:6d:28:dd:57:af:4d:b5:90:09:00:a1:c0:39:48:a2
                        is_hw = yes
                        pkinit_cert_match = &amp;&amp;&lt;EKU&gt;msScLogin,&lt;KU&gt;digitalSignature
                }
        }</pre>
<p>This is where the magic happens. First we tell the Kerberos client to allow pkinit (which is for pre-authentication, aka token login). Next we make a section for pkinit, tell it where the PEM (ascii) encoded CA certs are, and make a section for our domain. In the domain section, we tell the Kerberos client which servers to trust, that the token is a hardware token, and the criteria needed for a valid login certificate from the smartcard.</p>
<p>The <tt>pkinit_cert_match</tt> field has the following documentation in the version of pkinit-nss that I am discussing:</p>
<blockquote><p>pkinit_cert_match   &#8211; Alternate combinations of client certificate<br />
characteristics which would cause it to be deemed<br />
sufficient for use.  Rules are specified as combinations<br />
of fields and specifications in the form<br />
[&amp;&amp;]&lt;FIELD1&gt;spec1[,&lt;FIELD2&gt;spec2[,...]] [...]<br />
&lt;FIELD1&gt;spec1[,&lt;FIELD2&gt;spec2[,...]] [...]<br />
[||]&lt;FIELD1&gt;spec1[,&lt;FIELD2&gt;spec2[,...]] [...]<br />
Recognized fields and the types of specifications to be<br />
used include<br />
&lt;SUBJECT&gt;     Regular expression.<br />
&lt;ISSUER&gt;      Regular expression.<br />
&lt;SAN&gt;         Regular expression.<br />
&lt;EKU&gt;         List of zero or more values, possibly<br />
including &#8220;pkinit&#8221;, &#8220;msScLogin&#8221;,<br />
&#8220;clientAuth&#8221;, and &#8220;emailProtection&#8221;.<br />
&lt;KU&gt;          List of zero or more values, possibly<br />
including &#8220;digitalSignature&#8221; and<br />
&#8220;keyEncipherment&#8221;.<br />
There is no default.</p></blockquote>
<p>pkinit-nss needs to match exactly one certificate off of your smartcard; you can use these criteria to specify which certificate will be used. Notice that in the above configuration I chose a certificate that was allowed for Microsoft Smart Card Login, and was a digital signature type of certificate.</p>
<p>Notice that the guids are collected via the <tt>pkinit-show-cert-guid</tt> command, and that they are space delimited.</p>
<h3>Collecting server guids</h3>
<ol>
<li>Get the server&#8217;s public certificate
<ol>
<li><tt>openssl s_client -connect kdc1.example.com:636</tt></li>
<li>Find the section that starts with &#8220;BEGIN CERTIFICATE&#8221; and ends with &#8220;END CERTIFICATE&#8221;; copy everything including the begin and end sections, and paste it into a file</li>
</ol>
</li>
<li>Use <tt>pkinit-show-cert-guid</tt> on the file to get the guid
<ul>
<li><tt>pkinit-show-cert-guid &lt;file&gt;</tt></li>
</ul>
</li>
<li>Repeat for every Active Directory server</li>
</ol>
<h2>Configure PAM</h2>
<p>The following is an example <tt>/etc/pam.d/system-auth</tt> file:</p>
<pre>auth        required      pam_env.so
auth        [success=2 default=ignore] pam_succeed_if.so service notin login:gdm:xdm:kdm:xscreensaver:gnome-screensaver:kscreensaver quiet use_uid
auth        [success=ok authinfo_unavail=2 ignore=2 default=die] pam_pkcs11.so
auth        [default=ignore] pam_krb5.so no_subsequent_prompt no_initial_prompt
auth        sufficient    pam_permit.so
auth        sufficient    pam_unix.so likeauth
auth        required      pam_deny.so

account     required      pam_unix.so broken_shadow
account     sufficient    pam_localuser.so
account     sufficient    pam_krb5.so
account     required      pam_permit.so

password    optional      pam_pkcs11.so
password    requisite     pam_cracklib.so retry=3 dcredit=-1 ucredit=-1 ocredit=-1 lcredit=-1 minlen=10
password    sufficient    pam_unix.so md5 shadow try_first_pass use_authtok remember=5
password    required      pam_deny.so

session     optional      pam_keyinit.so revoke
session     optional      pam_krb5.so
session     required      pam_limits.so
session     [success=1 default=ignore] pam_succeed_if.so service in crond quiet use_uid
session     required      pam_unix.so</pre>
<p>It is important to understand what is happening in the auth stack here. Read the following three lines carefully:</p>
<pre>auth        [success=ok authinfo_unavail=2 ignore=2 default=die] pam_pkcs11.so
auth        [default=ignore] pam_krb5.so no_subsequent_prompt no_initial_prompt
auth        sufficient    pam_permit.so</pre>
<p>The first line says if pam_pkcs11 succeeds, continue on; if a card isn&#8217;t available, or we can&#8217;t map the card identity to a user, skip the next two lines; if the user puts his pin in incorrectly, exit with a failure. The second line says don&#8217;t prompt for a pin, don&#8217;t prompt for a password if the pin fails, and ignore the return value of pam_krb5. The third line says no matter what, return success.</p>
<p>This configuration ensures a few things:</p>
<ol>
<li>Ensures if the user types her pin in incorrectly, it won&#8217;t cause two incorrect pins against the card</li>
<li>Ensures that the system will only try to get a Kerberos ticket if the user is using a card</li>
<li>Ensures that the user can log into the system with a card even if they can&#8217;t get a Kerberos ticket
<ul>
<li>If you wish to require valid Kerberos authentication, pam_krb5 should be marked as &#8220;required&#8221;, the pam_success line should be removed, and the pam_pkcs11 module line&#8217;s arguments should be changed to &#8220;authinfo_unavail=1 ignore=1&#8243;</li>
</ul>
</li>
</ol>
<p>Notice that if you are trying to completely eliminate passwords, that this PAM configuration won&#8217;t fully do it. This configuration still allows password authentication to the local system. You should tweak this configuration as necessary. Remember, however, that you likely don&#8217;t wish to lock root out of the system &#8211; so be careful!</p>
<p>As I mentioned earlier, if your default Kerberos domain cannot be your Active Directory domain, you can specify it explicitly in the PAM configuration; to do this, your auth line for pam_krb5 would change to the following:</p>
<pre>auth        [default=done] pam_krb5.so realm=EXAMPLE.COM no_subsequent_prompt no_initial_prompt</pre>
<h2>Conclusion</h2>
<p>This series should be a good starting ground for getting your PKI environment set up on your RHEL systems. In the future I will discuss more ways to eliminate passwords by using Smart Card authentication.</p>
<p>If you have any questions, please be sure to leave a comment!</p>
<p><strong>Update (04/24/2009):</strong> I updated the krb5.conf configuration.</p>
<p><code>pkinit_cert_match = &amp;&amp;msScLogin,digitalSignature</code></p>
<p>should have read as:</p>
<p><code>pkinit_cert_match = &amp;&amp;&lt;EKU&gt;msScLogin,&lt;KU&gt;digitalSignature</code></p>
<p><strong>Update (05/12/2009):</strong> The PAM configuration was slightly incorrect. The way it was previously written would deny users access if pam_krb failed.<br />
<strong>Update (05/26/2009):</strong> The openssl s_client command was slightly incorrect; I changed &#8220;connect&#8221; to &#8220;-connect&#8221;.</p>
<!-- Social Bookmarks BEGIN -->
<div class="social_bookmark">
<a><strong><em>Share:</em></strong></a>
<br />
<div class="d">
<br />
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://buzz.yahoo.com/submit?submitUrl=http%3A%2F%2Fryandlane.com%2Fblog%2F2008%2F12%2F08%2Fseamless-smartcard-login-with-pam_pkcs11-and-pam_krb5-against-an-active-directory-domain-using-red-hat-enterprise-linux-5-part-3%2F&amp;submitHeadline=Seamless+Smartcard+login+with+pam_pkcs11%2C+and+pam_krb5+against+an+Active+Directory+Domain+using+Red+Hat+Enterprise+Linux+5+%28Part+3%29&amp;submitSummary=" rel="nofollow" title="Add to&nbsp;Buzz"><img class="social_img" src="http://ryandlane.com/blog/wp-content/plugins/social-bookmarks/images/buzz.png" title="Add to&nbsp;Buzz" alt="Add to&nbsp;Buzz" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://del.icio.us/post?url=http%3A%2F%2Fryandlane.com%2Fblog%2F2008%2F12%2F08%2Fseamless-smartcard-login-with-pam_pkcs11-and-pam_krb5-against-an-active-directory-domain-using-red-hat-enterprise-linux-5-part-3%2F&amp;title=Seamless+Smartcard+login+with+pam_pkcs11%2C+and+pam_krb5+against+an+Active+Directory+Domain+using+Red+Hat+Enterprise+Linux+5+%28Part+3%29" rel="nofollow" title="Add to&nbsp;Del.icio.us"><img class="social_img" src="http://ryandlane.com/blog/wp-content/plugins/social-bookmarks/images/delicious.png" title="Add to&nbsp;Del.icio.us" alt="Add to&nbsp;Del.icio.us" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fryandlane.com%2Fblog%2F2008%2F12%2F08%2Fseamless-smartcard-login-with-pam_pkcs11-and-pam_krb5-against-an-active-directory-domain-using-red-hat-enterprise-linux-5-part-3%2F&amp;title=Seamless+Smartcard+login+with+pam_pkcs11%2C+and+pam_krb5+against+an+Active+Directory+Domain+using+Red+Hat+Enterprise+Linux+5+%28Part+3%29" rel="nofollow" title="Add to&nbsp;digg"><img class="social_img" src="http://ryandlane.com/blog/wp-content/plugins/social-bookmarks/images/digg.png" title="Add to&nbsp;digg" alt="Add to&nbsp;digg" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.facebook.com/sharer.php?u=http%3A%2F%2Fryandlane.com%2Fblog%2F2008%2F12%2F08%2Fseamless-smartcard-login-with-pam_pkcs11-and-pam_krb5-against-an-active-directory-domain-using-red-hat-enterprise-linux-5-part-3%2F" rel="nofollow" title="Add to&nbsp;Facebook"><img class="social_img" src="http://ryandlane.com/blog/wp-content/plugins/social-bookmarks/images/facebook.png" title="Add to&nbsp;Facebook" alt="Add to&nbsp;Facebook" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fryandlane.com%2Fblog%2F2008%2F12%2F08%2Fseamless-smartcard-login-with-pam_pkcs11-and-pam_krb5-against-an-active-directory-domain-using-red-hat-enterprise-linux-5-part-3%2F&amp;title=Seamless+Smartcard+login+with+pam_pkcs11%2C+and+pam_krb5+against+an+Active+Directory+Domain+using+Red+Hat+Enterprise+Linux+5+%28Part+3%29" rel="nofollow" title="Add to&nbsp;LinkedIn"><img class="social_img" src="http://ryandlane.com/blog/wp-content/plugins/social-bookmarks/images/linkedin.png" title="Add to&nbsp;LinkedIn" alt="Add to&nbsp;LinkedIn" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://reddit.com/submit?url=http%3A%2F%2Fryandlane.com%2Fblog%2F2008%2F12%2F08%2Fseamless-smartcard-login-with-pam_pkcs11-and-pam_krb5-against-an-active-directory-domain-using-red-hat-enterprise-linux-5-part-3%2F&amp;title=Seamless+Smartcard+login+with+pam_pkcs11%2C+and+pam_krb5+against+an+Active+Directory+Domain+using+Red+Hat+Enterprise+Linux+5+%28Part+3%29" rel="nofollow" title="Add to&nbsp;reddit"><img class="social_img" src="http://ryandlane.com/blog/wp-content/plugins/social-bookmarks/images/reddit.png" title="Add to&nbsp;reddit" alt="Add to&nbsp;reddit" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://slashdot.org/bookmark.pl?url=http%3A%2F%2Fryandlane.com%2Fblog%2F2008%2F12%2F08%2Fseamless-smartcard-login-with-pam_pkcs11-and-pam_krb5-against-an-active-directory-domain-using-red-hat-enterprise-linux-5-part-3%2F&amp;title=Seamless+Smartcard+login+with+pam_pkcs11%2C+and+pam_krb5+against+an+Active+Directory+Domain+using+Red+Hat+Enterprise+Linux+5+%28Part+3%29" rel="nofollow" title="Add to&nbsp;Slashdot"><img class="social_img" src="http://ryandlane.com/blog/wp-content/plugins/social-bookmarks/images/slashdot.png" title="Add to&nbsp;Slashdot" alt="Add to&nbsp;Slashdot" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fryandlane.com%2Fblog%2F2008%2F12%2F08%2Fseamless-smartcard-login-with-pam_pkcs11-and-pam_krb5-against-an-active-directory-domain-using-red-hat-enterprise-linux-5-part-3%2F&amp;title=Seamless+Smartcard+login+with+pam_pkcs11%2C+and+pam_krb5+against+an+Active+Directory+Domain+using+Red+Hat+Enterprise+Linux+5+%28Part+3%29" rel="nofollow" title="Add to&nbsp;Stumble Upon"><img class="social_img" src="http://ryandlane.com/blog/wp-content/plugins/social-bookmarks/images/stumbleupon.png" title="Add to&nbsp;Stumble Upon" alt="Add to&nbsp;Stumble Upon" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://twitter.com/home/?status=Check+out+Seamless+Smartcard+login+with+pam_pkcs11%2C+and+pam_krb5+against+an+Active+Directory+Domain+using+Red+Hat+Enterprise+Linux+5+%28Part+3%29+@+http%3A%2F%2Fryandlane.com%2Fblog%2F2008%2F12%2F08%2Fseamless-smartcard-login-with-pam_pkcs11-and-pam_krb5-against-an-active-directory-domain-using-red-hat-enterprise-linux-5-part-3%2F" rel="nofollow" title="Add to&nbsp;Twitter"><img class="social_img" src="http://ryandlane.com/blog/wp-content/plugins/social-bookmarks/images/twitter.png" title="Add to&nbsp;Twitter" alt="Add to&nbsp;Twitter" /></a>
<br />
</div>
</div>
<!-- Social Bookmarks END -->


<p>Related posts:<ol><li><a href='http://ryandlane.com/blog/2008/10/24/seamless-smartcard-login-with-pam_pkcs11-and-pam_krb5-against-an-active-directory-domain-using-red-hat-enterprise-linux-5-part-2/' rel='bookmark' title='Permanent Link: Seamless Smartcard login with pam_pkcs11, and pam_krb5 against an Active Directory Domain using Red Hat Enterprise Linux 5 (Part 2)'>Seamless Smartcard login with pam_pkcs11, and pam_krb5 against an Active Directory Domain using Red Hat Enterprise Linux 5 (Part 2)</a></li>
<li><a href='http://ryandlane.com/blog/2008/10/21/seamless-smartcard-login-with-pam_pkcs11-and-pam_krb5-against-an-active-directory-domain-using-red-hat-enterprise-linux-5-part-1/' rel='bookmark' title='Permanent Link: Seamless Smartcard login with pam_pkcs11, and pam_krb5 against an Active Directory Domain using Red Hat Enterprise Linux 5 (Part 1)'>Seamless Smartcard login with pam_pkcs11, and pam_krb5 against an Active Directory Domain using Red Hat Enterprise Linux 5 (Part 1)</a></li>
<li><a href='http://ryandlane.com/blog/2008/12/08/using-nss-with-openssh-for-smart-card-login/' rel='bookmark' title='Permanent Link: Using NSS with OpenSSH for Smart Card Login'>Using NSS with OpenSSH for Smart Card Login</a></li>
</ol></p><img src="http://feeds.feedburner.com/~r/RyanLanesBlog_ldap/~4/ncL-uYmAwt0" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://ryandlane.com/blog/2008/12/08/seamless-smartcard-login-with-pam_pkcs11-and-pam_krb5-against-an-active-directory-domain-using-red-hat-enterprise-linux-5-part-3/feed/</wfw:commentRss>
		<slash:comments>28</slash:comments>
		<feedburner:origLink>http://ryandlane.com/blog/2008/12/08/seamless-smartcard-login-with-pam_pkcs11-and-pam_krb5-against-an-active-directory-domain-using-red-hat-enterprise-linux-5-part-3/</feedburner:origLink></item>
	</channel>
</rss><!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using memcached
Page Caching using memcached
Database Caching 176/403 queries in 2.755 seconds using memcached
Object Caching 0/0 objects using memcached

Served from: ryandlane.com @ 2010-07-29 13:56:52 -->
