<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Active Directory on Evan Hoffman</title><link>https://evan.wtf/tags/active-directory/</link><description>Recent content in Active Directory on Evan Hoffman</description><generator>Hugo</generator><language>en-US</language><copyright>Evan Hoffman</copyright><lastBuildDate>Thu, 26 May 2011 13:29:31 +0000</lastBuildDate><atom:link href="https://evan.wtf/tags/active-directory/index.xml" rel="self" type="application/rss+xml"/><item><title>Juniper SRX cannot use RADIUS authentication for client VPN?</title><link>https://evan.wtf/2011/05/26/juniper-srx-cannot-use-radius-authentication-for-client-vpn/</link><pubDate>Thu, 26 May 2011 13:29:31 +0000</pubDate><guid>https://evan.wtf/2011/05/26/juniper-srx-cannot-use-radius-authentication-for-client-vpn/</guid><description>Apparently using RADIUS authentication with Juniper SRX VPN is strange voodoo magic that&amp;rsquo;s never been tried before.</description></item><item><title>Renaming a single-label domain to a FQDN</title><link>https://evan.wtf/2011/04/07/renaming-a-single-label-domain-to-a-fqdn/</link><pubDate>Thu, 07 Apr 2011 17:56:54 +0000</pubDate><guid>https://evan.wtf/2011/04/07/renaming-a-single-label-domain-to-a-fqdn/</guid><description>&lt;p&gt;Long ago &amp;ndash; eons, perhaps &amp;ndash; 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 &amp;ldquo;example.com&amp;rdquo; our domain is just &amp;ldquo;example&amp;rdquo;). Over the years this has led to lots of &amp;ldquo;fun&amp;rdquo; on the part of Windows admins who&amp;rsquo;ve worked here as the implications of this choice became more apparent.&lt;/p&gt;&#10;&lt;p&gt;Since I inherited this system about a year ago, I haven&amp;rsquo;t really bumped up against any problems stemming from the single-label domain issue&amp;hellip; 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&amp;rsquo;t say &amp;ldquo;totally&amp;rdquo; 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: &lt;strong&gt;The namespace cannot be queried. The specified domain either does not exist or could not be contacted.&lt;/strong&gt;. I couldn&amp;rsquo;t do anything with the namespace - 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&amp;rsquo;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.&lt;/p&gt;</description></item><item><title>Exchange 2010 Post-Upgrade weirdness: can't edit Mail Non-Universal Group or Security Group</title><link>https://evan.wtf/2010/10/21/exchange-2010-post-upgrade-weirdness-cant-edit-mail-non-universal-group-or-security-group-2/</link><pubDate>Thu, 21 Oct 2010 22:29:38 +0000</pubDate><guid>https://evan.wtf/2010/10/21/exchange-2010-post-upgrade-weirdness-cant-edit-mail-non-universal-group-or-security-group-2/</guid><description>&lt;p&gt;Now that everyone&amp;rsquo;s been moved to Exchange 2010 we&amp;rsquo;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&amp;rsquo;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&amp;rsquo;t see &lt;em&gt;users&lt;/em&gt; 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.&lt;/p&gt;</description></item><item><title>Exchange 2010 Post-Upgrade weirdness: can't edit Mail Non-Universal Group or Security Group</title><link>https://evan.wtf/2010/10/21/exchange-2010-post-upgrade-weirdness-cant-edit-mail-non-universal-group-or-security-group/</link><pubDate>Thu, 21 Oct 2010 22:29:38 +0000</pubDate><guid>https://evan.wtf/2010/10/21/exchange-2010-post-upgrade-weirdness-cant-edit-mail-non-universal-group-or-security-group/</guid><description>&lt;p&gt;Now that everyone&amp;rsquo;s been moved to Exchange 2010 we&amp;rsquo;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&amp;rsquo;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&amp;rsquo;t see &lt;em&gt;users&lt;/em&gt; 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.&lt;/p&gt;</description></item><item><title>ldapsearch example on Active Directory</title><link>https://evan.wtf/2010/08/26/ldapsearch-on-active-directory-2/</link><pubDate>Thu, 26 Aug 2010 10:40:18 +0000</pubDate><guid>https://evan.wtf/2010/08/26/ldapsearch-on-active-directory-2/</guid><description>&lt;p&gt;Just putting this here for safekeeping since I couldn&amp;rsquo;t remember the exact syntax.&lt;/p&gt;&#10;&lt;pre tabindex="0"&gt;&lt;code&gt;[evan@ehoffman 10:35:50 ~]$ ldapsearch -x -LLL -D &amp;#34;ldapuser@example.com&amp;#34; -w password -b &amp;#34;OU=Users,DC=example,DC=com&amp;#34; -s sub -H ldaps://activedirectory.example.com &amp;#34;(sn=hoffman)&amp;#34; cn mail displayName samaccountname&#10;dn: CN=Evan Hoffman,OU=Tech,OU=Users,DC=example,DC=com&#10;cn: Evan Hoffman&#10;displayName: Evan D. Hoffman&#10;sAMAccountName: ehoffman&#10;mail: Evan.Hoffman@example.com&#10;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Explanation: Connect to &lt;strong&gt;activedirectory.example.com&lt;/strong&gt; using ldaps (SSL) with simple authentication, binding as &lt;strong&gt;&lt;a href="mailto:ldapuser@example.com"&gt;ldapuser@example.com&lt;/a&gt;&lt;/strong&gt; with password &lt;strong&gt;password&lt;/strong&gt;; search for &lt;strong&gt;(sn=hoffman)&lt;/strong&gt; within the &lt;strong&gt;OU=Users,DC=example,DC=com&lt;/strong&gt; search base (branch), and search the &lt;strong&gt;sub&lt;/strong&gt;tree. Return the &lt;strong&gt;cn&lt;/strong&gt;, &lt;strong&gt;displayName&lt;/strong&gt;, and &lt;strong&gt;samaccountname&lt;/strong&gt; fields.&lt;/p&gt;</description></item><item><title>ldapsearch on Active Directory</title><link>https://evan.wtf/2010/08/26/ldapsearch-on-active-directory/</link><pubDate>Thu, 26 Aug 2010 10:40:18 +0000</pubDate><guid>https://evan.wtf/2010/08/26/ldapsearch-on-active-directory/</guid><description>&lt;p&gt;Just putting this here for safekeeping since I couldn&amp;rsquo;t remember the exact syntax.&lt;/p&gt;&#10;&lt;pre tabindex="0"&gt;&lt;code&gt;[evan@ehoffman 10:35:50 ~]$ ldapsearch -x -LLL -D &amp;#34;ldapuser@example.com&amp;#34; -w password -b &amp;#34;OU=Users,DC=example,DC=com&amp;#34; -s sub -H ldaps://activedirectory.example.com &amp;#34;(sn=hoffman)&amp;#34; cn mail displayName samaccountname&#10;dn: CN=Evan Hoffman,OU=Tech,OU=Users,DC=example,DC=com&#10;cn: Evan Hoffman&#10;displayName: Evan D. Hoffman&#10;sAMAccountName: ehoffman&#10;mail: Evan.Hoffman@example.com&#10;&lt;/code&gt;&lt;/pre&gt;</description></item><item><title>Changing Active Directory Password in Browser through OWA 2010</title><link>https://evan.wtf/2010/08/05/changing-active-directory-password-in-browser-through-owa-2010/</link><pubDate>Thu, 05 Aug 2010 11:29:41 +0000</pubDate><guid>https://evan.wtf/2010/08/05/changing-active-directory-password-in-browser-through-owa-2010/</guid><description>&lt;p&gt;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 &lt;a href="https://evan.wtf/2010/01/13/victory-change-active-directory-password-via-ldap-through-browser/"&gt;finally figured it out&lt;/a&gt;, but since I&amp;rsquo;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:&lt;/p&gt;&#10;&lt;p&gt;&lt;a href="https://evan.wtf/wp-content/uploads/2010/08/change-password-owa1.png"&gt;&lt;img src="https://evan.wtf/wp-content/uploads/2010/08/change-password-owa1.png" alt="" title="Change Password OWA"&gt;&lt;/a&gt;&lt;/p&gt;</description></item><item><title>Generate a report of Exchange mailbox sizes broken out by department and location</title><link>https://evan.wtf/2010/04/29/generate-a-report-of-exchange-mailbox-sizes-broken-out-by-department-and-location/</link><pubDate>Thu, 29 Apr 2010 11:44:44 +0000</pubDate><guid>https://evan.wtf/2010/04/29/generate-a-report-of-exchange-mailbox-sizes-broken-out-by-department-and-location/</guid><description>&lt;p&gt;I found a script a few months ago that generated a CSV report of mailbox size, which included the Mailbox Name (usually the user&amp;rsquo;s name), size in Kbytes, number of items, which server it&amp;rsquo;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&amp;rsquo;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&amp;rsquo;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 - change the extension to .vbs to run it. You&amp;rsquo;ll need to plug in your Exchange server and domain controller where the placeholders currently are.&lt;/p&gt;</description></item><item><title>Victory! Change Active Directory Password via LDAP through browser</title><link>https://evan.wtf/2010/01/13/victory-change-active-directory-password-via-ldap-through-browser/</link><pubDate>Wed, 13 Jan 2010 13:51:43 +0000</pubDate><guid>https://evan.wtf/2010/01/13/victory-change-active-directory-password-via-ldap-through-browser/</guid><description>&lt;p&gt;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&amp;rsquo;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&amp;rsquo;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 &lt;em&gt;should&lt;/em&gt; be encrypted end to end.&lt;/p&gt;</description></item><item><title>LDAP-Active Directory authentication, Part 3</title><link>https://evan.wtf/2010/01/08/ldap-active-directory-authentication-part-3/</link><pubDate>Fri, 08 Jan 2010 19:12:34 +0000</pubDate><guid>https://evan.wtf/2010/01/08/ldap-active-directory-authentication-part-3/</guid><description>&lt;p&gt;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).&lt;/p&gt;&#10;&lt;p&gt;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 &amp;ndash; they can do it right in Windows when they&amp;rsquo;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&amp;rsquo;s not.&lt;/p&gt;</description></item><item><title>Single sign-on with Linux clients and Active Directory LDAP, Part 2</title><link>https://evan.wtf/2010/01/05/single-sign-on-with-linux-clients-and-active-directory-ldap-part-2/</link><pubDate>Tue, 05 Jan 2010 18:45:55 +0000</pubDate><guid>https://evan.wtf/2010/01/05/single-sign-on-with-linux-clients-and-active-directory-ldap-part-2/</guid><description>&lt;p&gt;Following up on &lt;a href="https://evan.wtf/evan/2009/12/25/single-sign-on-with-linux-clients-and-active-directory-ldap-part-1/"&gt;my previous post&lt;/a&gt;, it turned out not to be as big of a deal as I&amp;rsquo;d originally expected to have Apache authenticate against AD and only allow users whose accounts weren&amp;rsquo;t disabled. In a nutshell, here&amp;rsquo;s what I did:&lt;/p&gt;&#10;&lt;p&gt;In your .htaccess file:&lt;/p&gt;&#10;&lt;pre tabindex="0"&gt;&lt;code&gt;AuthBasicProvider ldap&#10;AuthType basic&#10;AuthName &amp;#34;AD LDAP Test&amp;#34;&#10;AuthLDAPURL &amp;#34;ldap://activedirectory.example.com/OU=Users,DC=example,DC=com?sAMAccountName?sub?(!(userAccountControl:1.2.840.113556.1.4.803:=2))&amp;#34;&#10;AuthzLDAPAuthoritative On&#10;AuthLDAPGroupAttribute member&#10;AuthLDAPBindDN ldapuser@example.com&#10;AuthLDAPBindPassword password&#10;Require ldap-group CN=Sysadmins,OU=Internal Groups,OU=Groups,DC=example,DC=com&#10;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;The key here is this LDAP filter: &lt;strong&gt;(!(userAccountControl:1.2.840.113556.1.4.803:=2))&lt;/strong&gt;. This is the bitwise &amp;ldquo;AND&amp;rdquo; of the userAccountControl field and the decimal number 2, which is Microsoft&amp;rsquo;s value for &amp;ldquo;account is disabled.&amp;rdquo; The codes are listed here: &lt;a href="http://support.microsoft.com/kb/305144"&gt;http://support.microsoft.com/kb/305144&lt;/a&gt;&lt;/p&gt;</description></item><item><title>Single sign-on with Linux clients and Active Directory LDAP, Part 1</title><link>https://evan.wtf/2009/12/25/single-sign-on-with-linux-clients-and-active-directory-ldap-part-1/</link><pubDate>Fri, 25 Dec 2009 00:20:15 +0000</pubDate><guid>https://evan.wtf/2009/12/25/single-sign-on-with-linux-clients-and-active-directory-ldap-part-1/</guid><description>&lt;p&gt;One project we&amp;rsquo;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&amp;rsquo;t trust it. So what I wanted to do was setup OpenLDAP as a &amp;ldquo;slave&amp;rdquo; to an Active Directory &amp;ldquo;master&amp;rdquo; and have all the LDAP info propagate over the slave whenever any changes were made in the master. I&amp;rsquo;ve done this with DNS - 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&amp;rsquo;t work like that when it comes to LDAP. Apparently AD doesn&amp;rsquo;t follow the RFC for LDAP (surprise!) so many things that would be expected to work with OpenLDAP won&amp;rsquo;t.&lt;/p&gt;</description></item></channel></rss>