<?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>Evan Hoffman&#039;s silly writings. &#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>When 3-nines uptime is just way too much.</description>
	<lastBuildDate>Mon, 06 Sep 2010 00:36:39 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>ldapsearch on Active Directory</title>
		<link>http://www.evanhoffman.com/evan/2010/08/26/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</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[active directory]]></category>
		<category><![CDATA[ad]]></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[Just putting this here for safekeeping since I couldn&#8217;t remember the exact syntax. [evan@ehoffman 10:35:50 ~]$ ldapsearch -x -LLL -D "ldapuser@example.com" -w password -b "OU=Users,DC=example,DC=com" -s sub -H ldaps://activedirectory.example.com "(sn=hoffman)" 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]]></description>
			<content:encoded><![CDATA[<p>Just putting this here for safekeeping since I couldn&#8217;t remember the exact syntax.</p>
<pre>
[evan@ehoffman 10:35:50 ~]$ ldapsearch -x -LLL -D "ldapuser@example.com" -w password -b "OU=Users,DC=example,DC=com" -s sub -H ldaps://activedirectory.example.com "(sn=hoffman)" 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
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.evanhoffman.com/evan/2010/08/26/ldapsearch-on-active-directory/feed/</wfw:commentRss>
		<slash:comments>0</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/</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</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[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 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[<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://www.evanhoffman.com/evan/wp-content/uploads/2010/08/Change-Password-OWA.png"><img src="http://www.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/</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</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[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 [...]]]></description>
			<content:encoded><![CDATA[<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://www.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/</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</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[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 [...]]]></description>
			<content:encoded><![CDATA[<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>(Edited 5/14/2010 to replace the inlined Perl script with a link to the script as a text file.)</p>
<p><a href='http://www.evanhoffman.com/evan/wp-content/uploads/2010/01/changeadpasswd.pl_.txt'>changeadpasswd.pl</a></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>2</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/</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</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[So 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[<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>
<p><code>Warning: ldap_mod_replace() [function.ldap-mod-replace]: Modify: Insufficient access in /home/evan/public_html/authtest/index.php</code></p>
<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>
<p><code><br />
$ 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<br />
ldap_initialize( ldaps://activedirectory.example.com )<br />
TLS certificate verification: Error, unable to get local issuer certificate<br />
request done: ld 0x9dd86e8 msgid 1<br />
replace unicodePwd:<br />
        "<br />
modifying entry "CN=Boba Fett,OU=Utility,OU=Users,DC=example,DC=com"<br />
modify complete<br />
request done: ld 0x9dd86e8 msgid 2<br />
ldapmodify: Insufficient access (50)<br />
        additional info: 00000005: SecErr: DSID-031A0F44, problem 4003 (INSUFF_ACCESS_RIGHTS), data 0<br />
</code></p>
<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>
<p><code><br />
dn: CN=Boba Fett,OU=Utility,OU=Users,DC=example,DC=com<br />
changetype: modify<br />
replace: unicodePwd<br />
unicodePwd::IgBhAGIAYwBkAGUAZgBnAGgAIgA=<br />
-<br />
</code></p>
<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/</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</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[Following 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[<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/</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</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[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 [...]]]></description>
			<content:encoded><![CDATA[<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>
