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

<channel>
	<title>Looking for the paradigm &#187; active directory</title>
	<atom:link href="http://www.evanhoffman.com/evan/tag/active-directory/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.evanhoffman.com/evan</link>
	<description>So I can pass it off</description>
	<lastBuildDate>Thu, 26 Jan 2012 22:17:15 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Juniper SRX cannot use RADIUS authentication for client VPN?</title>
		<link>http://www.evanhoffman.com/evan/2011/05/26/juniper-srx-cannot-use-radius-authentication-for-client-vpn/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=juniper-srx-cannot-use-radius-authentication-for-client-vpn</link>
		<comments>http://www.evanhoffman.com/evan/2011/05/26/juniper-srx-cannot-use-radius-authentication-for-client-vpn/#comments</comments>
		<pubDate>Thu, 26 May 2011 17:29:31 +0000</pubDate>
		<dc:creator>Evan Hoffman</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[active directory]]></category>
		<category><![CDATA[authentication]]></category>
		<category><![CDATA[igx]]></category>
		<category><![CDATA[jtac]]></category>
		<category><![CDATA[juniper]]></category>
		<category><![CDATA[junos]]></category>
		<category><![CDATA[radius]]></category>
		<category><![CDATA[srx]]></category>
		<category><![CDATA[vpn]]></category>

		<guid isPermaLink="false">http://www.evanhoffman.com/evan/?p=1313</guid>
		<description><![CDATA[Apparently using RADIUS authentication with Juniper SRX VPN is strange voodoo magic that's never been tried before.]]></description>
			<content:encoded><![CDATA[<div style="vertical-align: top; float: right; margin-left: 10px;"><a href="http://twitter.com/share?url=http://www.evanhoffman.com/evan/2011/05/26/juniper-srx-cannot-use-radius-authentication-for-client-vpn/&via=EvanHoffman&text=Juniper SRX cannot use RADIUS authentication for client VPN?&related=EvanHoffman:&lang=en&count=horizontal" class="twitter-share-button">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script></div><div class="plus-one-wrap"><g:plusone size="small" href="http://www.evanhoffman.com/evan/2011/05/26/juniper-srx-cannot-use-radius-authentication-for-client-vpn/"></g:plusone></div><p>We&#8217;ve been trying now literally for weeks to configure our Juniper SRX VPN using RADIUS authentication.  We previously had a Cisco ASA 5510 and it worked fine but we moved to an SRX because it was much easier to administer and was about 1/3 the cost.  For the most part we&#8217;ve been pretty happy with the SRX vs the ASA &#8211; common-sense features like saving previous configs for trivial rollback, a web gui that&#8217;s way easier to use than ASDM, etc.  But this VPN thing is a real fiasco.  Basically what we want to do is use the SRX to authenticate against our Active Directory using IAS.  </p>
<p>The closest we&#8217;ve gotten so far is having the SRX authenticate via RADIUS but apparently we still need to maintain a local user list on the SRX itself, defeating the purpose of central authentication.  We were sold 10 VPN licenses with the understanding that this meant we could have up to 10 simultaneous VPN connections open.  Apparently that&#8217;s true, but we&#8217;d have to specify which 10 users can access the VPN, which won&#8217;t work for us.  </p>
<p>This doesn&#8217;t seem like we&#8217;re trying to do anything exotic here but according to the vendor and JTAC support, they&#8217;re not aware of anyone doing this, and have no idea how to do it.  The ticket&#8217;s been open with Juniper for over 1 month now.  We&#8217;re at the point where we just want a refund for the VPN licenses rather than continuing to bang our heads against the wall with this.  The vendor originally wanted us to buy an SA VPN appliance in addition to the SRX, but assured us the SRX would do what we needed with the caveat that the JunOS Pulse client for the SRX VPN was kind of crappy.</p>
<p>So after opening tickets in JTAC and the vendor&#8217;s support system, the net result apparently is that this is actually not possible.  Not only is it not possible but everybody acts like we&#8217;re trying to do some strange voodoo.  I mean, we have other stuff hooked into AD IAS already &#8211; wifi access points for one, and the old ASA AnyConnect VPN for another.  We even went so far as to create a FreeRadius server to serve as an intermediary between the SRX and AD so we could get better log messages, and that didn&#8217;t work either.</p>
<p>So hopefully we can get a refund on the 10 useless VPN licenses and use our old ASA for AnyConnect VPN.  I&#8217;m not holding my breath though.  Fortunately we&#8217;ve eliminated the need for VPN for almost everything, the local fileserver is really the only thing left that requires VPN access.  </p>
]]></content:encoded>
			<wfw:commentRss>http://www.evanhoffman.com/evan/2011/05/26/juniper-srx-cannot-use-radius-authentication-for-client-vpn/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Renaming a single-label domain to a FQDN</title>
		<link>http://www.evanhoffman.com/evan/2011/04/07/renaming-a-single-label-domain-to-a-fqdn/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=renaming-a-single-label-domain-to-a-fqdn</link>
		<comments>http://www.evanhoffman.com/evan/2011/04/07/renaming-a-single-label-domain-to-a-fqdn/#comments</comments>
		<pubDate>Thu, 07 Apr 2011 21:56:54 +0000</pubDate>
		<dc:creator>Evan Hoffman</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[2003]]></category>
		<category><![CDATA[2008]]></category>
		<category><![CDATA[active directory]]></category>
		<category><![CDATA[ad]]></category>
		<category><![CDATA[dfs]]></category>
		<category><![CDATA[domain]]></category>
		<category><![CDATA[exchange]]></category>
		<category><![CDATA[exchange 2010]]></category>
		<category><![CDATA[rename]]></category>
		<category><![CDATA[rendom]]></category>
		<category><![CDATA[single-label]]></category>
		<category><![CDATA[windows]]></category>
		<category><![CDATA[work]]></category>

		<guid isPermaLink="false">http://www.evanhoffman.com/evan/?p=1144</guid>
		<description><![CDATA[TweetLong ago &#8212; eons, perhaps &#8212; before I had anything to do with the Windows environment here, someone created the AD domain in my company as a single-label domain (e.g. instead of &#8220;example.com&#8221; our domain is just &#8220;example&#8221;). Over the years this has led to lots of &#8220;fun&#8221; on the part of Windows admins who&#8217;ve [...]]]></description>
			<content:encoded><![CDATA[<div style="vertical-align: top; float: right; margin-left: 10px;"><a href="http://twitter.com/share?url=http://www.evanhoffman.com/evan/2011/04/07/renaming-a-single-label-domain-to-a-fqdn/&via=EvanHoffman&text=Renaming a single-label domain to a FQDN&related=EvanHoffman:&lang=en&count=horizontal" class="twitter-share-button">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script></div><div class="plus-one-wrap"><g:plusone size="small" href="http://www.evanhoffman.com/evan/2011/04/07/renaming-a-single-label-domain-to-a-fqdn/"></g:plusone></div><p>Long ago &#8212; eons, perhaps &#8212; before I had anything to do with the Windows environment here, someone created the AD domain in my company as a single-label domain (e.g. instead of &#8220;example.com&#8221; our domain is just &#8220;example&#8221;).  Over the years this has led to lots of &#8220;fun&#8221; on the part of Windows admins who&#8217;ve worked here as the implications of this choice became more apparent.</p>
<p>Since I inherited this system about a year ago, I haven&#8217;t really bumped up against any problems stemming from the single-label domain issue&#8230; until now.  I recently attempted to add a new Windows 2008r2 file server to our DFS replication group/namespace.  This totally failed for some mysterious reason.  Well, I shouldn&#8217;t say &#8220;totally&#8221; failed, as I was able to add it to the DFS replication group, but unable to add it to the DFS namespace.  In my attempt to debug the namespace issue, I deleted the namespace and attempted to recreate it, but just kept getting this error: <b>The namespace cannot be queried.  The specified domain either does not exist or could not be contacted.</b>.  I couldn&#8217;t do anything with the namespace &#8211; even clicking on it in the DFS Management console brought up an error.  After some searching I found that this was likely due to having a single-label domain.  I wasn&#8217;t sure why the error was happening even on Windows 2003 machines though, maybe joining a 2008r2 box to the domain made some schema changes?  I tried a few suggestions like editing the hosts file but nothing seemed to resolve this.</p>
<p>Fortunately, we didn&#8217;t really need DFS namespaces and were able to just direct everybody to the fileserver via its DNS name, though as you can imagine this was clumsy.  However, since this has been a problem since time immemorial, I figured it was time to see if it was fixable.  After some quick searching, I found <a href="http://technet.microsoft.com/en-us/library/cc732097%28WS.10%29.aspx">RENDOM</a>.  However, after even more searching I discovered <a href="http://technet.microsoft.com/en-us/library/cc816848%28WS.10%29.aspx">this TechNet article</a> which says: </p>
<blockquote><p>The domain rename operation is not supported in Microsoft Exchange Server 2007 or Exchange Server 2010. DNS domain rename is supported in Exchange Server 2003. However, renaming of the NetBIOS domain name is not supported in any version of Exchange Server. Other non-Microsoft applications might also not support domain rename. </p></blockquote>
<p>Well.  We&#8217;re running Exchange 2010.  So now what?  I guess we&#8217;re going to have to create a second domain and migrate over to it.  We&#8217;d already discussed this as a likely way of implementing the rename anyway, since it didn&#8217;t seem like &#8220;RENDOM&#8221; had any rollback procedure &#8211; it either just works (hahaha) or semi-works and semi-fails, leaving a wake of destruction throughout AD.  Building a second domain seems like a lot of work, but at least we can move users over one at a time, and we get the side benefit of starting fresh, outgrowing the 5+ years of crud that&#8217;s accumulated in our AD.</p>
<p>Guess we&#8217;ll see what happens.  Neither option seems like much fun.  I guess the alternative is do nothing, but Microsoft clearly doesn&#8217;t think very highly of single-label domains, and anyone who asks about them gets looked at funny.  At least it gives us something to do!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.evanhoffman.com/evan/2011/04/07/renaming-a-single-label-domain-to-a-fqdn/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Exchange 2010 Post-Upgrade weirdness: can&#039;t edit Mail Non-Universal Group or Security Group</title>
		<link>http://www.evanhoffman.com/evan/2010/10/21/exchange-2010-post-upgrade-weirdness-cant-edit-mail-non-universal-group-or-security-group/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=exchange-2010-post-upgrade-weirdness-cant-edit-mail-non-universal-group-or-security-group</link>
		<comments>http://www.evanhoffman.com/evan/2010/10/21/exchange-2010-post-upgrade-weirdness-cant-edit-mail-non-universal-group-or-security-group/#comments</comments>
		<pubDate>Fri, 22 Oct 2010 02:29:38 +0000</pubDate>
		<dc:creator>Evan Hoffman</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[active directory]]></category>
		<category><![CDATA[ad]]></category>
		<category><![CDATA[exchange]]></category>
		<category><![CDATA[exchange 2010]]></category>
		<category><![CDATA[migration]]></category>
		<category><![CDATA[powershell]]></category>
		<category><![CDATA[windows]]></category>
		<category><![CDATA[work]]></category>

		<guid isPermaLink="false">http://www.evanhoffman.com/evan/?p=850</guid>
		<description><![CDATA[TweetNow that everyone&#8217;s been moved to Exchange 2010 we&#8217;ve started using the 2010 Exchange Managment Console/Shell exclusively which has revealed some weirdness. First, we created a new group in AD using an old script (which used LDAP) and created a Mail-enabled Global Security group. We put people in the group, and everything seemed to be [...]]]></description>
			<content:encoded><![CDATA[<div style="vertical-align: top; float: right; margin-left: 10px;"><a href="http://twitter.com/share?url=http://www.evanhoffman.com/evan/2010/10/21/exchange-2010-post-upgrade-weirdness-cant-edit-mail-non-universal-group-or-security-group/&via=EvanHoffman&text=Exchange 2010 Post-Upgrade weirdness: can&#039;t edit Mail Non-Universal Group or Security Group&related=EvanHoffman:&lang=en&count=horizontal" class="twitter-share-button">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script></div><div class="plus-one-wrap"><g:plusone size="small" href="http://www.evanhoffman.com/evan/2010/10/21/exchange-2010-post-upgrade-weirdness-cant-edit-mail-non-universal-group-or-security-group/"></g:plusone></div><p>Now that everyone&#8217;s been moved to Exchange 2010 we&#8217;ve started using the 2010 Exchange Managment Console/Shell exclusively which has revealed some weirdness.  First, we created a new group in AD using an old script (which used LDAP) and created a Mail-enabled Global Security group.  We put people in the group, and everything seemed to be working fine until it was discovered that users in the group couldn&#8217;t see the group in the Global Address List.  Users not in the group had no problem seeing the group.  Additionally, users in the group couldn&#8217;t see <em>users</em> added directly in 2010.  This only appeared to affect the GAL; the users were able to send/receive email fine with the full SMTP addresses.</p>
<p><span id="more-850"></span><br />
My first guess was that I was being punished for having forgotten to upgrade the LDAP address lists to OPATH.  I don&#8217;t really know what that even means, but when I attempted to edit the address lists in EMC I&#8217;d get an error that they needed to be upgraded.  Fortunately, <a href="http://technet.microsoft.com/en-us/library/cc164366%28EXCHG.80%29.aspx">this Technet article</a> lists the commands needed to upgrade the lists.  I did it but this didn&#8217;t appear to resolve all the issues.</p>
<p>At this point, after some Googling, I came across this tidbit:</p>
<blockquote><p>If you&#8217;re moving from Exchange 2000/2003 to Exchange 2007 or Exchange 2010, you&#8217;re going to want to convert all your domain local and global distribution and mail-enabled security groups to universal groups so they can be managed using the Exchange management tools.</p></blockquote>
<p>This explains a few things we&#8217;ve noticed &#8211; inability to add Global (Non-Universal) groups to a newly created (Universal) group, for one.  So it appears what we should do is upgrade all the Global groups to Universal.  First, how do we get a list of all the Global groups?  EMS/PowerShell to the rescue:</p>
<pre>[PS] C:\Windows\system32>Get-Group  | Where {$_.GroupType -Like "Global*"  -AND $_.RecipientType -eq "MailNonUniversalGroup"} |
Export-Csv -encoding "utf8" -Path \\fileserver\Tech\groups1.csv</pre>
<p>You can refine the filter further, and when it looks correct you can just pipe the output to Set-Group:</p>
<pre>Get-Group  | Where {$_.GroupType -Like "Global*"  -AND $_.RecipientType -eq "MailNonUniversalGroup"} | Set-Group -Universal</pre>
<p>But now for the most important question: <strong>will this break anything?</strong>  I have no idea.  We only have a single domain in our AD forest so we&#8217;ve never had need to use Universal, and I don&#8217;t <em>think</em> there should be a problem, but I don&#8217;t really have any idea.</p>
<p>I ran the Get-Group/Set-Group commands and they seemed to work as intended for all but about 60 of the target groups.  The groups that didn&#8217;t get converted all had weird issues &#8211; aliases that contained illegal characters (which I fixed), or some of them complained that a particular user (I think the Owner of the group in AD) was not found (even though it was in the exact location it was saying it wasn&#8217;t, though the user was disabled).  I &#8220;manually&#8221; converted these groups to Universal via the radio button in the properties dialog in Active Dir Users &#038; Groups.  Not the most elegant solution but it worked.  So all the groups in question are now Universal Security groups.  Will this solve the problem?  Well, I&#8217;ll have to wait until tomorrow to find out.</p>
<p>Reference links:</p>
<ul>
<li><a href="http://blogs.technet.com/b/sfodel/archive/2008/08/04/need-to-convert-global-groups-to-universal-groups.aspx">Need to convert Global groups to Universal groups? Do you have messages to global groups disappearing?</a>
<li><a href="http://social.technet.microsoft.com/Forums/en-US/exchangesvradmin/thread/c7d25d85-b246-45d2-b52b-a6539bc0edb2">  Changing Group Type via PowerShell</a>
<li><a href="http://www.expta.com/2009/10/how-to-convert-local-and-global-groups.html">How to Convert Local and Global Groups to Universal Groups</a>
<li><a href="http://social.technet.microsoft.com/Forums/en-US/exchange2010/thread/a587a97d-0d22-4540-aff0-5728b06e287c">Forum post about the &#8220;BypassSecurityGroupManagerCheck&#8221; security error</a>
<li><a href="http://theessentialexchange.com/blogs/michael/archive/2008/02/28/exchange-server-2007-and-universal-groups.aspx">Exchange Server 2007 and Universal Groups</a>
<li><a href="http://support.microsoft.com/kb/231273">KB 231273: Group Type and Scope Usage in Windows</a>
<li><a href="http://www.experts-exchange.com/Software/Server_Software/Email_Servers/Exchange/Q_24694362.html">Mail Universal Groups vs Mail Non-Universal Groups</a> on Experts Exchange
<li><a href="http://blogs.technet.com/b/msukucc/archive/2009/02/23/recipients-list.aspx">Technet blog: Recipients List</a>
<li><a href="http://social.technet.microsoft.com/forums/en-US/exchangesvrdeploy/thread/a6ed9be8-bae9-4c4d-b540-224e4911be1a">Technet forum: Mail enabled distribution groups in AD</a>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.evanhoffman.com/evan/2010/10/21/exchange-2010-post-upgrade-weirdness-cant-edit-mail-non-universal-group-or-security-group/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ldapsearch example on Active Directory</title>
		<link>http://www.evanhoffman.com/evan/2010/08/26/ldapsearch-on-active-directory/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=ldapsearch-on-active-directory</link>
		<comments>http://www.evanhoffman.com/evan/2010/08/26/ldapsearch-on-active-directory/#comments</comments>
		<pubDate>Thu, 26 Aug 2010 14:40:18 +0000</pubDate>
		<dc:creator>Evan Hoffman</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[active directory]]></category>
		<category><![CDATA[ad]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[example]]></category>
		<category><![CDATA[ldap]]></category>
		<category><![CDATA[ldapsearch]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[windows]]></category>
		<category><![CDATA[work]]></category>

		<guid isPermaLink="false">http://www.evanhoffman.com/evan/?p=566</guid>
		<description><![CDATA[TweetJust putting this here for safekeeping since I couldn&#8217;t remember the exact syntax. &#91;evan@ehoffman 10:35:50 ~&#93;$ ldapsearch -x -LLL -D &#34;ldapuser@example.com&#34; -w password -b &#34;OU=Users,DC=example,DC=com&#34; -s sub -H ldaps://activedirectory.example.com &#34;(sn=hoffman)&#34; cn mail displayName samaccountname dn: CN=Evan Hoffman,OU=Tech,OU=Users,DC=example,DC=com cn: Evan Hoffman displayName: Evan D. Hoffman sAMAccountName: ehoffman mail: Evan.Hoffman@example.com Explanation: Connect to activedirectory.example.com using ldaps (SSL) [...]]]></description>
			<content:encoded><![CDATA[<div style="vertical-align: top; float: right; margin-left: 10px;"><a href="http://twitter.com/share?url=http://www.evanhoffman.com/evan/2010/08/26/ldapsearch-on-active-directory/&via=EvanHoffman&text=ldapsearch example on Active Directory&related=EvanHoffman:&lang=en&count=horizontal" class="twitter-share-button">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script></div><div class="plus-one-wrap"><g:plusone size="small" href="http://www.evanhoffman.com/evan/2010/08/26/ldapsearch-on-active-directory/"></g:plusone></div><p>Just putting this here for safekeeping since I couldn&#8217;t remember the exact syntax.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>evan<span style="color: #000000; font-weight: bold;">@</span>ehoffman <span style="color: #000000;">10</span>:<span style="color: #000000;">35</span>:<span style="color: #000000;">50</span> ~<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ ldapsearch <span style="color: #660033;">-x</span> <span style="color: #660033;">-LLL</span> <span style="color: #660033;">-D</span> <span style="color: #ff0000;">&quot;ldapuser@example.com&quot;</span> <span style="color: #660033;">-w</span> password <span style="color: #660033;">-b</span> <span style="color: #ff0000;">&quot;OU=Users,DC=example,DC=com&quot;</span> <span style="color: #660033;">-s</span> sub <span style="color: #660033;">-H</span> ldaps:<span style="color: #000000; font-weight: bold;">//</span>activedirectory.example.com <span style="color: #ff0000;">&quot;(sn=hoffman)&quot;</span> cn mail displayName samaccountname
dn: <span style="color: #007800;">CN</span>=Evan Hoffman,<span style="color: #007800;">OU</span>=Tech,<span style="color: #007800;">OU</span>=Users,<span style="color: #007800;">DC</span>=example,<span style="color: #007800;">DC</span>=com
cn: Evan Hoffman
displayName: Evan D. Hoffman
sAMAccountName: ehoffman
mail: Evan.Hoffman<span style="color: #000000; font-weight: bold;">@</span>example.com</pre></div></div>

<p><ins datetime="2011-05-10T20:24:56+00:00">Explanation:</ins> Connect to <b>activedirectory.example.com</b> using ldaps (SSL) with simple authentication, binding as <b>ldapuser@example.com</b> with password <b>password</b>; search for <b>(sn=hoffman)</b> within the <b>OU=Users,DC=example,DC=com</b> search base (branch), and search the <b>sub</b>tree.  Return the <b>cn</b>, <b>displayName</b>, and <b>samaccountname</b> fields.</p>
<p>Refer to the <a href="http://linux.die.net/man/1/ldapsearch">ldapsearch</a> man page for more options.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.evanhoffman.com/evan/2010/08/26/ldapsearch-on-active-directory/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Changing Active Directory Password in Browser through OWA 2010</title>
		<link>http://www.evanhoffman.com/evan/2010/08/05/changing-active-directory-password-in-browser-through-owa-2010/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=changing-active-directory-password-in-browser-through-owa-2010</link>
		<comments>http://www.evanhoffman.com/evan/2010/08/05/changing-active-directory-password-in-browser-through-owa-2010/#comments</comments>
		<pubDate>Thu, 05 Aug 2010 15:29:41 +0000</pubDate>
		<dc:creator>Evan Hoffman</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[active directory]]></category>
		<category><![CDATA[ad]]></category>
		<category><![CDATA[browser]]></category>
		<category><![CDATA[change password]]></category>
		<category><![CDATA[exchange]]></category>
		<category><![CDATA[exchange 2010]]></category>
		<category><![CDATA[ldap]]></category>
		<category><![CDATA[outlook web access]]></category>
		<category><![CDATA[owa]]></category>
		<category><![CDATA[windows]]></category>
		<category><![CDATA[work]]></category>

		<guid isPermaLink="false">http://www.evanhoffman.com/evan/?p=478</guid>
		<description><![CDATA[TweetA few months ago I was on a quest to figure out how to change my Active Directory password via a browser (for Linux/Mac users). I finally figured it out, but since I&#8217;ve been working on this Exchange 2010 migration I noticed one of the features of OWA (Outlook Web App) in Exchange 2010 is [...]]]></description>
			<content:encoded><![CDATA[<div style="vertical-align: top; float: right; margin-left: 10px;"><a href="http://twitter.com/share?url=http://www.evanhoffman.com/evan/2010/08/05/changing-active-directory-password-in-browser-through-owa-2010/&via=EvanHoffman&text=Changing Active Directory Password in Browser through OWA 2010&related=EvanHoffman:&lang=en&count=horizontal" class="twitter-share-button">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script></div><div class="plus-one-wrap"><g:plusone size="small" href="http://www.evanhoffman.com/evan/2010/08/05/changing-active-directory-password-in-browser-through-owa-2010/"></g:plusone></div><p>A few months ago I was on a quest to figure out how to change my Active Directory password via a browser (for Linux/Mac users).  I <a href="http://www.evanhoffman.com/evan/?p=321">finally figured it out</a>, but since I&#8217;ve been working on this Exchange 2010 migration I noticed one of the features of OWA (Outlook Web App) in Exchange 2010 is that you can change the AD password right in the browser from within the app:</p>
<p><a href="http://evanhoffman.com/evan/wp-content/uploads/2010/08/Change-Password-OWA.png"><img src="http://evanhoffman.com/evan/wp-content/uploads/2010/08/Change-Password-OWA.png" alt="" title="Change Password OWA" width="620" height="399" class="alignleft size-full wp-image-479" /></a></p>
<p>The new OWA has a zillion other awesome features, my favorite being that Firefox and Chrome are no longer second-class-citizens and can use the &#8220;full version&#8221; now, even on Linux.  So anyway, I guess all my work was for nothing.  Not the first time (or the last). <img src='http://www.evanhoffman.com/evan/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.evanhoffman.com/evan/2010/08/05/changing-active-directory-password-in-browser-through-owa-2010/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Generate a report of Exchange mailbox sizes broken out by department and location</title>
		<link>http://www.evanhoffman.com/evan/2010/04/29/generate-a-report-of-exchange-mailbox-sizes-broken-out-by-department-and-location/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=generate-a-report-of-exchange-mailbox-sizes-broken-out-by-department-and-location</link>
		<comments>http://www.evanhoffman.com/evan/2010/04/29/generate-a-report-of-exchange-mailbox-sizes-broken-out-by-department-and-location/#comments</comments>
		<pubDate>Thu, 29 Apr 2010 15:44:44 +0000</pubDate>
		<dc:creator>Evan Hoffman</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[active directory]]></category>
		<category><![CDATA[computers]]></category>
		<category><![CDATA[exchange]]></category>
		<category><![CDATA[ldap]]></category>
		<category><![CDATA[microsoft]]></category>
		<category><![CDATA[vbscript]]></category>
		<category><![CDATA[work]]></category>

		<guid isPermaLink="false">http://www.evanhoffman.com/evan/?p=380</guid>
		<description><![CDATA[TweetI found a script a few months ago that generated a CSV report of mailbox size, which included the Mailbox Name (usually the user&#8217;s name), size in Kbytes, number of items, which server it&#8217;s on, etc. This was very helpful, but I wanted to see which department within the company used the most space on [...]]]></description>
			<content:encoded><![CDATA[<div style="vertical-align: top; float: right; margin-left: 10px;"><a href="http://twitter.com/share?url=http://www.evanhoffman.com/evan/2010/04/29/generate-a-report-of-exchange-mailbox-sizes-broken-out-by-department-and-location/&via=EvanHoffman&text=Generate a report of Exchange mailbox sizes broken out by department and location&related=EvanHoffman:&lang=en&count=horizontal" class="twitter-share-button">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script></div><div class="plus-one-wrap"><g:plusone size="small" href="http://www.evanhoffman.com/evan/2010/04/29/generate-a-report-of-exchange-mailbox-sizes-broken-out-by-department-and-location/"></g:plusone></div><p>I found a script a few months ago that generated a CSV report of mailbox size, which included the Mailbox Name (usually the user&#8217;s name), size in Kbytes, number of items, which server it&#8217;s on, etc.  This was very helpful, but I wanted to see which department within the company used the most space on the mail server, and the department wasn&#8217;t one of the pieces of data included in the report.  It took a while but I figured out how to do LDAP lookups in vbscript and was able to add that info, so the report now has the user&#8217;s department, office location, and quota limit in it as well as the other fields.  This makes it very easy to do a PivotChart in Excel to generate a pie chart of the size by department.  The script is attached &#8211; change the extension to .vbs to run it.  You&#8217;ll need to plug in your Exchange server and domain controller where the placeholders currently are.</p>
<p><a href='http://evanhoffman.com/evan/wp-content/uploads/2010/04/EmailSizeByDepartment.vbs_.txt'>EmailSizeByDepartment.vbs</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.evanhoffman.com/evan/2010/04/29/generate-a-report-of-exchange-mailbox-sizes-broken-out-by-department-and-location/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Victory!  Change Active Directory Password via LDAP through browser</title>
		<link>http://www.evanhoffman.com/evan/2010/01/13/victory-change-active-directory-password-via-ldap-through-browser/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=victory-change-active-directory-password-via-ldap-through-browser</link>
		<comments>http://www.evanhoffman.com/evan/2010/01/13/victory-change-active-directory-password-via-ldap-through-browser/#comments</comments>
		<pubDate>Wed, 13 Jan 2010 17:51:43 +0000</pubDate>
		<dc:creator>Evan Hoffman</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[active directory]]></category>
		<category><![CDATA[change password]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[ldap]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[password]]></category>
		<category><![CDATA[perl]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[unicodePwd]]></category>
		<category><![CDATA[victory]]></category>
		<category><![CDATA[windows]]></category>
		<category><![CDATA[work]]></category>

		<guid isPermaLink="false">http://www.evanhoffman.com/evan/?p=321</guid>
		<description><![CDATA[TweetI had to give up on PHP and go to Perl, but it turned out not to be so bad. Users can now change their Active Directory passwords via a self-service web page that doesn&#8217;t require admin credentials. The Perl code is below.  Authentication to the script is done via .htaccess LDAP authentication, so the [...]]]></description>
			<content:encoded><![CDATA[<div style="vertical-align: top; float: right; margin-left: 10px;"><a href="http://twitter.com/share?url=http://www.evanhoffman.com/evan/2010/01/13/victory-change-active-directory-password-via-ldap-through-browser/&via=EvanHoffman&text=Victory!  Change Active Directory Password via LDAP through browser&related=EvanHoffman:&lang=en&count=horizontal" class="twitter-share-button">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script></div><div class="plus-one-wrap"><g:plusone size="small" href="http://www.evanhoffman.com/evan/2010/01/13/victory-change-active-directory-password-via-ldap-through-browser/"></g:plusone></div><p>I had to give up on PHP and go to Perl, but it turned out not to be so bad.  Users can now change their Active Directory passwords via a self-service web page that doesn&#8217;t require admin credentials.  The Perl code is below.  Authentication to the script is done via .htaccess LDAP authentication, so the REMOTE_USER env variable is assumed to contain the user&#8217;s username (sAMAccountName) by the time this script is called.  There is a simple check for $ENV{HTTPS} to ensure the script is called via SSL, and AD requires password changes to be done via ldaps, so the whole thing <em>should</em> be encrypted end to end.</p>
<p><script src="https://gist.github.com/1268417.js?file=changeadpasswd.pl"></script></p>
<p>(Edited 5/14/2010 to replace the inlined Perl script with a link to the script as a text file.)</p>
<p>(<ins datetime="2011-10-06T19:39:21+00:00">Edited 10/6/2011 to replace link to script with link to gist</ins>)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.evanhoffman.com/evan/2010/01/13/victory-change-active-directory-password-via-ldap-through-browser/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>LDAP-Active Directory authentication, Part 3</title>
		<link>http://www.evanhoffman.com/evan/2010/01/08/ldap-active-directory-authentication-part-3/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=ldap-active-directory-authentication-part-3</link>
		<comments>http://www.evanhoffman.com/evan/2010/01/08/ldap-active-directory-authentication-part-3/#comments</comments>
		<pubDate>Fri, 08 Jan 2010 23:12:34 +0000</pubDate>
		<dc:creator>Evan Hoffman</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[active directory]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[DSID-03190F00]]></category>
		<category><![CDATA[DSID-031A0F44]]></category>
		<category><![CDATA[ldap]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[unicodePwd]]></category>
		<category><![CDATA[work]]></category>

		<guid isPermaLink="false">http://www.evanhoffman.com/evan/?p=309</guid>
		<description><![CDATA[TweetSo I got everything working with .htaccess and AD/LDAP authentication. Just add LDAPVerifyServerCert Off to the httpd config to let Apache authenticate against an AD server with a self-signed certificate (without dealing with the annoyance of putting the cert on each Apache server). With that piece of the puzzle largely solved, I moved on to [...]]]></description>
			<content:encoded><![CDATA[<div style="vertical-align: top; float: right; margin-left: 10px;"><a href="http://twitter.com/share?url=http://www.evanhoffman.com/evan/2010/01/08/ldap-active-directory-authentication-part-3/&via=EvanHoffman&text=LDAP-Active Directory authentication, Part 3&related=EvanHoffman:&lang=en&count=horizontal" class="twitter-share-button">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script></div><div class="plus-one-wrap"><g:plusone size="small" href="http://www.evanhoffman.com/evan/2010/01/08/ldap-active-directory-authentication-part-3/"></g:plusone></div><p>So I got everything working with .htaccess and AD/LDAP authentication.  Just add <tt>LDAPVerifyServerCert Off</tt> to the httpd config to let Apache authenticate against an AD server with a self-signed certificate (without dealing with the annoyance of putting the cert on each Apache server).</p>
<p>With that piece of the puzzle largely solved, I moved on to another: how will users change their passwords (which are all stored in Active Directory)?  For users running Windows this is pretty trivial &#8212; they can do it right in Windows when they&#8217;re logged into the domain.  But what about Linux users?  I figured the easiest thing to do would be to make a web form to do this.  The user would login (with the http/LDAP auth I previously setup) and the form would ask for their password (twice) and update it in Active Directory.  Sounds pretty simple to me.  I think if this were OpenLDAP it probably would be, but being AD, it&#8217;s not.</p>
<p><span id="more-309"></span></p>
<p>I&#8217;d already spent an hour or two writing the script (in PHP) when I was able to test its basic functionality.  What I got was this:</p>
<pre>Warning: ldap_mod_replace() [function.ldap-mod-replace]: Modify: Insufficient access in /home/evan/public_html/authtest/index.php</pre>
<p>After some hair pulling I realized that I was binding with my &#8220;dummy&#8221; user when attempting to change the password.  I figured the solution would be to re-bind as the user whose password I was attempting to change, which is what I did.  I verified that the new bind worked, but I still couldn&#8217;t change the password.  I decided to fall back to command line and started issuing some ldapmodify commands to see what I could and couldn&#8217;t do as the user.  For whatever reason, it appears that even though the user CAN change his password in AD (the &#8220;user cannot change password&#8221; setting is NOT selected &#8212; I checked), the user cannot change his password through LDAP.</p>
<pre>
$ ldapmodify -vv -x -d8 -D "CN=Boba Fett,OU=Utility,OU=Users,DC=example,DC=com" -w secret -H ldaps://activedirectory.example.com -f bfett.ldif
ldap_initialize( ldaps://activedirectory.example.com )
TLS certificate verification: Error, unable to get local issuer certificate
request done: ld 0x9dd86e8 msgid 1
replace unicodePwd:
        "
modifying entry "CN=Boba Fett,OU=Utility,OU=Users,DC=example,DC=com"
modify complete
request done: ld 0x9dd86e8 msgid 2
ldapmodify: Insufficient access (50)
        additional info: 00000005: SecErr: DSID-031A0F44, problem 4003 (INSUFF_ACCESS_RIGHTS), data 0
</pre>
<p>I Googled for the error code &#8211; <a href="http://www.google.com/search?q=DSID-031A0F44">DSID-031A0F44</a> &#8211; and found a couple of threads about people with the same problem, but no solutions.</p>
<p>The LDIF file I fed in looks like this:</p>

<div class="wp_syntax"><div class="code"><pre class="ldif" style="font-family:monospace;">dn: CN=Boba Fett,OU=Utility,OU=Users,DC=example,DC=com
changetype: modify
replace: unicodePwd
unicodePwd::IgBhAGIAYwBkAGUAZgBnAGgAIgA=
-</pre></div></div>

<p>When I run the same command with my own DN/password for binding it works fine (though I did discover that you can assign multiple values to unicodePwd, meaning that, until I fixed it, the test user had <b>two valid passwords</b>, which seems like a bug on Microsoft&#8217;s part), I assume because I&#8217;m a domain admin.  An &#8220;easy&#8221; out would be simply to have the script bind as a domain admin, but that means I&#8217;d be hardcoding a Domain Admin password in the script, which I&#8217;m against.  I&#8217;ll have to put some more thought into this.  Maybe Linux users will just have to log in to a Windows workstation to change their passwords.  That&#8217;s not ideal, but it does already work.</p>
<p>Grr&#8230;</p>
<p><b>Update</b> &#8211; Click the &#8220;ldap&#8221; tag below to see all the LDAP-related posts, including the solution to changing AD passwords via a browser.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.evanhoffman.com/evan/2010/01/08/ldap-active-directory-authentication-part-3/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Single sign-on with Linux clients and Active Directory LDAP, Part 2</title>
		<link>http://www.evanhoffman.com/evan/2010/01/05/single-sign-on-with-linux-clients-and-active-directory-ldap-part-2/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=single-sign-on-with-linux-clients-and-active-directory-ldap-part-2</link>
		<comments>http://www.evanhoffman.com/evan/2010/01/05/single-sign-on-with-linux-clients-and-active-directory-ldap-part-2/#comments</comments>
		<pubDate>Tue, 05 Jan 2010 22:45:55 +0000</pubDate>
		<dc:creator>Evan Hoffman</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[active directory]]></category>
		<category><![CDATA[ldap]]></category>
		<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://www.evanhoffman.com/evan/?p=298</guid>
		<description><![CDATA[TweetFollowing up on my previous post, it turned out not to be as big of a deal as I&#8217;d originally expected to have Apache authenticate against AD and only allow users whose accounts weren&#8217;t disabled. In a nutshell, here&#8217;s what I did: In your .htaccess file: AuthBasicProvider ldap AuthType basic AuthName "AD LDAP Test" AuthLDAPURL [...]]]></description>
			<content:encoded><![CDATA[<div style="vertical-align: top; float: right; margin-left: 10px;"><a href="http://twitter.com/share?url=http://www.evanhoffman.com/evan/2010/01/05/single-sign-on-with-linux-clients-and-active-directory-ldap-part-2/&via=EvanHoffman&text=Single sign-on with Linux clients and Active Directory LDAP, Part 2&related=EvanHoffman:&lang=en&count=horizontal" class="twitter-share-button">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script></div><div class="plus-one-wrap"><g:plusone size="small" href="http://www.evanhoffman.com/evan/2010/01/05/single-sign-on-with-linux-clients-and-active-directory-ldap-part-2/"></g:plusone></div><p>Following up on <a href="http://www.evanhoffman.com/evan/2009/12/25/single-sign-on-with-linux-clients-and-active-directory-ldap-part-1/">my previous post</a>, it turned out not to be as big of a deal as I&#8217;d originally expected to have Apache authenticate against AD and only allow users whose accounts weren&#8217;t disabled.  In a nutshell, here&#8217;s what I did:</p>
<p><span id="more-298"></span></p>
<p>In your .htaccess file:</p>
<pre>
AuthBasicProvider ldap
AuthType basic
AuthName "AD LDAP Test"
AuthLDAPURL     "ldap://activedirectory.example.com/OU=Users,DC=example,DC=com?sAMAccountName?sub?(!(userAccountControl:1.2.840.113556.1.4.803:=2))"
AuthzLDAPAuthoritative On
AuthLDAPGroupAttribute member
AuthLDAPBindDN ldapuser@example.com
AuthLDAPBindPassword password
Require ldap-group CN=Sysadmins,OU=Internal Groups,OU=Groups,DC=example,DC=com
</pre>
<p>The key here is this LDAP filter: <b>(!(userAccountControl:1.2.840.113556.1.4.803:=2))</b>.  This is the bitwise &#8220;AND&#8221; of the userAccountControl field and the decimal number 2, which is Microsoft&#8217;s value for &#8220;account is disabled.&#8221;  The codes are listed here: <a href="http://support.microsoft.com/kb/305144">http://support.microsoft.com/kb/305144</a></p>
<p>In httpd.conf (or some other server config file &#8211; I did it in /etc/httpd/conf.d/mod_authz_ldap.conf inside the <ifModule> section), add this directive:</p>
<pre>LDAPOpCacheEntries 0</pre>
<p>This tells Apache not to cache the results of the LDAP op.  If you don&#8217;t put this in there, the server will cache the result of the user&#8217;s login for whatever the TTL is, and the user will be able to login even after you disable the account (until the cache expires).  There may be other ways around this issue, but this works for me.</p>
<p>This works pretty well so far.  Now I can create a &#8220;SVN Users&#8221; group in Active Directory, put the people I want in that group, use the above method for authentication and everyone&#8217;s SVN login will be the same as their domain login. Single sign-on one step closer.  Yay!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.evanhoffman.com/evan/2010/01/05/single-sign-on-with-linux-clients-and-active-directory-ldap-part-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Single sign-on with Linux clients and Active Directory LDAP, Part 1</title>
		<link>http://www.evanhoffman.com/evan/2009/12/25/single-sign-on-with-linux-clients-and-active-directory-ldap-part-1/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=single-sign-on-with-linux-clients-and-active-directory-ldap-part-1</link>
		<comments>http://www.evanhoffman.com/evan/2009/12/25/single-sign-on-with-linux-clients-and-active-directory-ldap-part-1/#comments</comments>
		<pubDate>Fri, 25 Dec 2009 04:20:15 +0000</pubDate>
		<dc:creator>Evan Hoffman</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[active directory]]></category>
		<category><![CDATA[ad]]></category>
		<category><![CDATA[ldap]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[work]]></category>

		<guid isPermaLink="false">http://www.evanhoffman.com/evan/?p=271</guid>
		<description><![CDATA[TweetOne project we&#8217;ve been working on for a while is single sign-on across all our servers and other services (e.g. SVN repository, a few other things). One thing I wanted to avoid, I guess for mostly religious reasons, was reliance on a Windows instance for any of our production environment. The logical part of my [...]]]></description>
			<content:encoded><![CDATA[<div style="vertical-align: top; float: right; margin-left: 10px;"><a href="http://twitter.com/share?url=http://www.evanhoffman.com/evan/2009/12/25/single-sign-on-with-linux-clients-and-active-directory-ldap-part-1/&via=EvanHoffman&text=Single sign-on with Linux clients and Active Directory LDAP, Part 1&related=EvanHoffman:&lang=en&count=horizontal" class="twitter-share-button">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script></div><div class="plus-one-wrap"><g:plusone size="small" href="http://www.evanhoffman.com/evan/2009/12/25/single-sign-on-with-linux-clients-and-active-directory-ldap-part-1/"></g:plusone></div><p>One project we&#8217;ve been working on for a while is single sign-on across all our servers and other services (e.g. SVN repository, a few other things).  One thing I wanted to avoid, I guess for mostly religious reasons, was reliance on a Windows instance for any of our production environment.  The logical part of my brain knows that people build huge websites with Windows farms and AD, but my gut still doesn&#8217;t trust it.  So what I wanted to do was setup OpenLDAP as a &#8220;slave&#8221; to an Active Directory &#8220;master&#8221; and have all the LDAP info propagate over the slave whenever any changes were made in the master.  I&#8217;ve done this with DNS &#8211; setup Bind as a slave to an AD server and everything basically works as I expect in a Bind-Bind master/slave scenario.  Well, it turns out that it doesn&#8217;t work like that when it comes to LDAP.  Apparently AD doesn&#8217;t follow the RFC for LDAP (surprise!) so many things that would be expected to work with OpenLDAP won&#8217;t.</p>
<p><span id="more-271"></span></p>
<p>I thought to myself, well, I can just go ahead and write something that will sync AD -> OpenLDAP every 5 minutes.  This would mostly work, except there&#8217;s apparently no way to retrieve the user&#8217;s password via LDAP &#8211; the field is write-only.  This makes it so I could essentially clone the whole LDAP tree&#8230; except for the piece of info that would let people login, which is the only thing I want it for.  This was frustrating.</p>
<p>I decided to explore a caching proxy.  I was thinking if I could setup OpenLDAP as a caching proxy to Active Directory, and set a cache time of ~15 minutes, it would at least let me withstand a Windows reboot (it&#8217;s 2009 and I still feel like any Windows fix begins and ends with a reboot).  I figured I&#8217;d start with a regular proxy first.  This turned out to be relatively simple: in slapd.conf, at the bottom, add:</p>
<pre>
database ldap
suffix          "dc=example,dc=com"
uri "ldap://activedirectory.example.com"
acl-bind bindmethod=simple binddn="some user's DN" credentials=password
</pre>
<p>Restart slapd and do an ldapsearch against the new ldap server and it will relay the request to the AD server and relay the response to you.</p>
<p>Caching is another story.  It seemed like it should be straightforward &#8211; <tt>yum install openldap-servers-overlays</tt> &#8211; but on my FC11 box, the package didn&#8217;t exist, and on my CentOS 5.4 box, openldap-servers-overlays didn&#8217;t appear to contain the pcache overlay used for caching.  So I gave up on that.</p>
<p>I ended up shelving the whole idea for a while and just created 2 Windows AD VMs that will serve as Production AD auth boxes.  I got everything configured &#8211; here&#8217;s a sample .htaccess file that queries our AD server for a user (by sAMAccountName, e.g. the &#8220;user&#8221; part of a username in the user@domain login name) and checks that the user is in the Sysadmins group:</p>
<pre>
AuthBasicProvider ldap
AuthType basic
AuthName "AD LDAP Test"
AuthLDAPURL     "ldap://activedirectory.example.com/OU=Users,DC=example,DC=com?sAMAccountName?sub"
AuthzLDAPAuthoritative On
AuthLDAPGroupAttribute member
AuthLDAPBindDN ldapuser@example.com
AuthLDAPBindPassword password
Require ldap-group CN=Sysadmins,OU=Internal Groups,OU=Groups,DC=example,DC=com
</pre>
<p>This works (I&#8217;ve modified it so it doesn&#8217;t include our real info, though).  It will let the user in if their credentials are OK and if they are in the required group.  What I discovered, however, is that if you go into AD and disable the user&#8217;s account, they are still allowed to log in (assuming the user is still in the account).  This seemed stupid.  I did some more research and discovered <a href="http://support.microsoft.com/kb/305144">userAccountControl</a>.  Apparently you need to use bit masking against this attribute to determine if an account is disabled.  This is as far as I&#8217;d gotten before vacation, but let me say this:</p>
<p>BRILLIANT, MICROSOFT!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.evanhoffman.com/evan/2009/12/25/single-sign-on-with-linux-clients-and-active-directory-ldap-part-1/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

