<?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>Kyle Brandt &#187; Windows / Exchange</title>
	<atom:link href="http://www.kbrandt.com/category/windows-exchange/feed" rel="self" type="application/rss+xml" />
	<link>http://www.kbrandt.com</link>
	<description>Original computing and productivity articles by a Linux administrator</description>
	<lastBuildDate>Tue, 06 Jul 2010 01:04:34 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Non-Exchange Active Directory Users and the Global Address List</title>
		<link>http://www.kbrandt.com/2009/04/non-exchange-active-directory-and-the-global-address-list.html</link>
		<comments>http://www.kbrandt.com/2009/04/non-exchange-active-directory-and-the-global-address-list.html#comments</comments>
		<pubDate>Fri, 10 Apr 2009 15:03:56 +0000</pubDate>
		<dc:creator>Kyle</dc:creator>
				<category><![CDATA[System Administration]]></category>
		<category><![CDATA[Windows / Exchange]]></category>
		<category><![CDATA[Active Directory]]></category>
		<category><![CDATA[Global Address List]]></category>
		<category><![CDATA[ldap]]></category>
		<category><![CDATA[VIM]]></category>

		<guid isPermaLink="false">http://www.kbrandt.com/?p=310</guid>
		<description><![CDATA[The Problem
I have some users who are on a different mail system but still part of my company.  The problem was that the users without Exchange 2003 accounts were not showing up in the Global Address List (GAL).  
Solution
The first step was to look at the LDAP filter that generates the GAL.  [...]]]></description>
			<content:encoded><![CDATA[<p><strong>The Problem</strong><br />
I have some users who are on a different mail system but still part of my company.  The problem was that the users without Exchange 2003 accounts were not showing up in the Global Address List (GAL).  </p>
<p><strong>Solution</strong><br />
The first step was to look at the LDAP filter that generates the GAL.  This can be viewed by going into the &#8216;Exchange System Manager&#8217; and then &#8216;Recipients::All Global Address Lists::Default Global Address List::General Tab&#8217;. The following is the filter on my Exchange system (which I am guessing is the default ):<br />
<code></p>
<pre class="brush: php">
(&amp; (mailnickname=*) (| (&amp;(objectCategory=person)(objectClass=user)(!(homeMDB=*))(!(msExchHomeServerName=*)))(&amp;(objectCategory=person)(objectClass=user)(|(homeMDB=*)(msExchHomeServerName=*)))(&amp;(objectCategory=person)(objectClass=contact))(objectCategory=group)(objectCategory=publicFolder)(objectCategory=msExchDynamicDistributionList) ))
</pre>
<p></code><br />
Looking at this filter, and not being rain man, I couldn&#8217;t just glance at and figure out what it meant.  The trick was to load it with VIM, because it will highlight matching parenthesis (When your cursor is over the opening parenthesis, the match closing parenthesis gets highlighted).  I then I indented based on that which resulted in:<br />
<code></p>
<pre class="brush: php">
(&amp;
   (mailnickname=*)
   (|
      (&amp;
         (objectCategory=person)
         (objectClass=user)
         (!(homeMDB=*))
         (!(msExchHomeServerName=*))
      )
      (&amp;
         (objectCategory=person)
         (objectClass=user)
         (|
            (homeMDB=*)
            (msExchHomeServerName=*))
      )
      (&amp;
         (objectCategory=person)
         (objectClass=contact)
      )
      (objectCategory=group)
      (objectCategory=publicFolder)
      (objectCategory=msExchDynamicDistributionList)
   )
)
</pre>
<p></code></p>
<p>The next step was to look at the active directory key value pairs for for one of the users that wasn&#8217;t showing up in the GAL.  I know of two ways to do this, one is to use adsiedit.msc for windows, or, if you want to be super cool, use ldapsearch in Linux.  To use ldapsearch to look at the attributes for the object, you would use a command like: <code>ldapsearch -w $PW -v -x -D "cn=Administrator,cn=Users,dc=myDomain,dc=com" "cn=Kyle Brandt"</code> where &#8216;Kyle Brandt&#8217; is the user you want to look at, Administrator is the user you use to authenticate with AD, PW is a shell environment variable with you password, and myDomain is your company&#8217;s AD domain name.<br />
Once I saw that mailNickname was not set, and since the filter says &#8217;show in GAL if mailNickname is set to something, OR if &#8230; lots of stuff &#8230;&#8217; all I had to do was use adsiedit to set that attribute to something. To learn how to read and write these filters see <a href="http://www.faqs.org/rfcs/rfc2254.html" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://www.faqs.org/rfcs/rfc2254.html');">this rfc</a> or <a href="http://msdn.microsoft.com/en-us/library/aa746475(VS.85).aspx" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://msdn.microsoft.com/en-us/library/aa746475(VS.85).aspx');">this msdn page</a>.  You can see if the change will effect the GAL book by clicking &#8216;Preview&#8217; on the tab were the filter originally was.  It will probably take a day or so (depending on your settings) before the change is actually made to the GAL.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kbrandt.com/2009/04/non-exchange-active-directory-and-the-global-address-list.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Moving a Front-End Exchange 2003 Server into your DMZ</title>
		<link>http://www.kbrandt.com/2009/02/moving-a-front-end-exchange-2003-server-into-your-dmz.html</link>
		<comments>http://www.kbrandt.com/2009/02/moving-a-front-end-exchange-2003-server-into-your-dmz.html#comments</comments>
		<pubDate>Mon, 02 Feb 2009 23:13:57 +0000</pubDate>
		<dc:creator>Kyle</dc:creator>
				<category><![CDATA[Networking]]></category>
		<category><![CDATA[System Administration]]></category>
		<category><![CDATA[Windows / Exchange]]></category>
		<category><![CDATA[Cisco]]></category>
		<category><![CDATA[DMZ]]></category>
		<category><![CDATA[Exchange 2003]]></category>
		<category><![CDATA[Firewalls]]></category>
		<category><![CDATA[IIS]]></category>
		<category><![CDATA[OWA]]></category>
		<category><![CDATA[Windows Server 2003]]></category>

		<guid isPermaLink="false">http://www.kbrandt.com/?p=139</guid>
		<description><![CDATA[Introduction:
A common practice in networks is to have at least two Exchange servers, a front-end server in the demilitarized zone (DMZ, perimeter network in Microsoft terminology) and a back-end server in the company&#8217;s main network.  The front-end server hosts the public SMTP server and web mail.  The back-end server hosts the actual mail (information stores).  [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Introduction:</strong><br />
A common practice in networks is to have at least two Exchange servers, a front-end server in the demilitarized zone (DMZ, perimeter network in Microsoft terminology) and a back-end server in the company&#8217;s main network.  The front-end server hosts the public SMTP server and web mail.  The back-end server hosts the actual mail (information stores).  There are two firewalls, one between your DMZ and your own network, and the second is between the DMZ and the Internet.</p>
<p>Although the firewall rules are well documented on the web, I ran into a couple of blocks when moving the Exchange front-end server into the DMZ.  I hope in sharing what I encountered helps others find doing the same thing a little less frustrating. My instructions will be specific to my experience in doing this, and is certainly not the only way to do it.</p>
<p><strong>Planning the Firewall Rules:</strong><br />
As I mentioned in previously there are two firewalls in this setup.  One is between the Internet and the DMZ and the other is between the DMZ and the internal network. In this example both the firewalls are just the Access Control Lists ( ACLs ) on the Internet interface and the DMZ interface of a Cisco router. The the front-end server is also behind Network Address Translation ( NAT ), so the server gets assigned a local IP.</p>
<p><img class="alignnone size-full wp-image-172" title="exchangedmz" src="http://www.kbrandt.com/wp-content/uploads/2009/02/exchangedmz.jpg" alt="exchangedmz" width="693" height="272" /></p>
<p>The logical layout is how to think about the set up.  Firewall 1 is actually an inbound ACL on the Gig 0/0 interface and Firewall 2 is and inbound ACL on the Gig 0/1 interface.  In this usage of inbound, &#8216;in&#8217; means heading into the interface ( see the actual layout ) and not &#8216;inbound&#8217; in the sense of inbound traffic from the Internet.  Firewall 1 is the firewall between the front-end server and the Internet. Firewall 2 is the firewall between the front-end exchange server and the primary domain controller as well as the back-end Exchange server. The rules on Firewall 2 assume you have bound remote procedure call ( RPC ) to specific port, which I will talk about more in the section about configuring the domain controller. The rules for Firewall 1 use the public Internet IP because that is in front of the NAT, in my example the public IP is 74.125.45.100 and it gets translated to 172.16.1.2 .</p>
<p><strong>Gig 0/0 ACL in ( Firewall 1 ):</strong><br />
<code>permit tcp any host 74.125.45.100 eq 25<br />
permit tcp any host 74.125.45.100 eq 80<br />
permit tcp any host 74.125.45.100 eq 110<br />
permit tcp any host 74.125.45.100 eq 143<br />
permit tcp any host 74.125.45.100 eq 443</code><br />
<strong>Gig 0/1 ACL in ( Firewall 2 ):</strong><br />
<code>permit tcp host 172.16.1.2 host 10.10.1.51 eq 25<br />
permit tcp host 172.16.1.2 host 10.10.1.51 eq 80<br />
permit tcp host 172.16.1.2 host 10.10.1.51 eq 143<br />
permit tcp host 172.16.1.2 host 10.10.1.51 eq 110<br />
permit tcp host 172.16.1.2 host 10.10.1.51 eq 691<br />
permit tcp host 172.16.1.2 host 10.10.1.50 eq 88<br />
permit udp host 172.16.1.2 host 10.10.1.50 eq 88<br />
permit tcp host 172.16.1.2 host 10.10.1.50 eq 389<br />
permit udp host 172.16.1.2 host 10.10.1.50 eq 389<br />
permit tcp host 172.16.1.2 host 10.10.1.50 eq 3268<br />
permit tcp host 172.16.1.2 host 10.10.1.50 eq 53<br />
permit udp host 172.16.1.2 host 10.10.1.50 eq 53<br />
permit tcp host 172.16.1.2 host 10.10.1.50 eq 135<br />
permit tcp host 172.16.1.2 host 10.10.1.50 eq 12125<br />
</code></p>
<p><strong>Active Directory Changes:</strong><br />
There were three changes I had to make in Active Directory.  The first was to change the DNS entries for the mail servers.  The second, which took me sometime to figure out, was to add the subnet to &#8216;Active Directory Sites and Services&#8217;.  I had to do this because this was the first Windows server being deployed in the DMZ. To do this go to Control Panel :: Administrative Tools :: Active Directory Sites and Services :: Right-Click Subnets :: New Subnet and then for our example add &#8216;172.16.1.1/24&#8242; and assign to whatever site it it is in.  You may also need to give it time to replicate. The third change is to bind RPC replication to a specific port so you don&#8217;t have to open the firewall between the front-end and back-end servers as much.  I chose to bind it to port 12125, if you don&#8217;t do this you will have open up TCP ports 1024 and above on the firewall.  To bind RPC you need two registry entires, see: <a href="http://support.microsoft.com/kb/224196" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://support.microsoft.com/kb/224196');">http://support.microsoft.com/kb/224196</a></p>
<p><strong>Changes on the Front End Mail Server:</strong><br />
Besides Assigning the new IP to the front end exchange server, you might need to bind each service to this new IP.  This wasn&#8217;t apparent to me because I could still connect to the SMTP and 443 ports but I got disconnected immediately.  This indicates that even though the service is set not to be listening on that IP, it does listen and just disconnects if the first packets of the session are not destined for the IP the service is bound to.  I can&#8217;t image how someone at Microsoft thought that this would be a good way to design the network stack on their operating system but that seems to be the way it works.  To adjust what IP webmail (ports 80 and 443) are bound to, go to: Control Panel :: Administrative Tools :: Internet Information Services ( IIS ) Manager :: Local Computer :: Web Sites :: Right Click which ever web sites is for web mail :: Web Site Tab and then change the IP to whatever the new IP is for your front-end server, in our example, 172.16.1.2.  Then to change the SMTP port and other service are bound to, go to: Exchange System Manager :: Administrative Groups :: Your Administrative Group ( i.e. First Administrative Group ) :: Servers :: The Front-End Server :: Protocols and then expanded each protocol, right click the virtual server, and change the IP in the General Tab.</p>
<p><strong>Changes on the Back End Mail Server:</strong><br />
When I did this I did not have to make any changes to the back end server, but you can check the references section for things you may need to do.  Also, this <em>is</em> windows, so you should probably reboot the server for good measure, and maybe several times.</p>
<p><strong>Conclusion:</strong><br />
Although your experience may be different I hope this helps people trying to do a similar thing.</p>
<p><strong>References:</strong><br />
<a href="http://technet.microsoft.com/en-us/library/aa997436(EXCHG.65).aspx" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://technet.microsoft.com/en-us/library/aa997436(EXCHG.65).aspx');">http://technet.microsoft.com/en-us/library/aa997436(EXCHG.65).aspx</a><br />
<a href="ttp://windowsitpro.com/article/articleid/46571/what-ports-do-you-need-to-open-to-allow-communication-between-a-microsoft-exchange-server-back-end-server-and-an-exchange-front-end-server.html" onclick="javascript:pageTracker._trackPageview('/outbound/article/ttp://windowsitpro.com/article/articleid/46571/what-ports-do-you-need-to-open-to-allow-communication-between-a-microsoft-exchange-server-back-end-server-and-an-exchange-front-end-server.html');"><span style="font-family: Arial; font-size: x-small;"><span>http://windowsitpro.com/article/articleid/46571/what-ports-do-you-need-to-open-to-allow-communication-between-a-microsoft-exchange-server-back-end-server-and-an-exchange-front-end-server.html</span></span></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.kbrandt.com/2009/02/moving-a-front-end-exchange-2003-server-into-your-dmz.html/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Authenticating with Active Directory using Likewise Open and Migrating from NIS</title>
		<link>http://www.kbrandt.com/2008/11/authenticating-with-active-directory.html</link>
		<comments>http://www.kbrandt.com/2008/11/authenticating-with-active-directory.html#comments</comments>
		<pubDate>Thu, 20 Nov 2008 13:55:00 +0000</pubDate>
		<dc:creator>Kyle</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Networking]]></category>
		<category><![CDATA[Windows / Exchange]]></category>
		<category><![CDATA[Active Directory]]></category>
		<category><![CDATA[Likewise Open]]></category>
		<category><![CDATA[Network Information Service]]></category>
		<category><![CDATA[NIS]]></category>

		<guid isPermaLink="false">http://www.kbrandt.com/?p=35</guid>
		<description><![CDATA[The current infrastructure at my office uses network information services (NIS) to authenticate users on Linux machines against the office&#8217;s Window&#8217;s domain.  I found this to be unreliable.  It depends upon Microsoft Identity Management for Unix, version 5.2, which is flaky in my experience.
My goal was to be able to transition from NIS [...]]]></description>
			<content:encoded><![CDATA[<p>The current infrastructure at my office uses network information services (<a href="http://en.wikipedia.org/wiki/Network_Information_Service" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://en.wikipedia.org/wiki/Network_Information_Service');">NIS</a>) to authenticate users on Linux machines against the office&#8217;s Window&#8217;s domain.  I found this to be unreliable.  It depends upon Microsoft Identity Management for Unix, version 5.2, which is flaky in my experience.</p>
<p>My goal was to be able to transition from NIS to authenticating directly with Active Directory (AD) smoothly.  I also wanted to maintain the shared home directories that reside on a network file system (NFS) server.  The solution I have chosen is<a href="http://www.likewisesoftware.com/products/likewise_open/" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://www.likewisesoftware.com/products/likewise_open/');"> Likewise Open</a>, I have found it very easy to set up while still being customizable.  In order to maintain the shared home directories I have just taken the automount configuration out of NIS and put it locally on each machine.  Even though this may not be as centralized I think it is better because the mounts don&#8217;t depend upon Microsoft&#8217;s Unix Identity Management.</p>
<p>The following are the steps I took to set this up. Likewise has good documentation so I recommend you look at that before you follow my steps.  I am deploying this as I rebuild machines with Centos 5.2 which makes the process a little neater (If you want to transition current machines you will probably need to google nsswitch.conf):</p>
<ol>
<li>When deploying Centos be sure to set up <a href="http://www.ntp.org/" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://www.ntp.org/');">Network Time Protocol</a> (NTP) during the installation because Kerberos authentication depends on approximate clock synchronization between the client and the server.</li>
<li>Download and install Likewise Open (as root):<br />
a)     <span style="font-family:courier new;">wget </span><a style="font-family: courier new;" href="http://www.likewisesoftware.com/bits/Fall08/3895/LikewiseIdentityServiceOpen-5.0.0.3895-linux-i386-rpm-installer" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://www.likewisesoftware.com/bits/Fall08/3895/LikewiseIdentityServiceOpen-5.0.0.3895-linux-i386-rpm-installer');">http://www.likewisesoftware.com/bits/Fall08/3895/LikewiseIdentityServiceOpen-5.0.0.3895-linux-i386-rpm-installer</a><br />
b) <span style="font-family:courier new;">chmod +x   LikewiseIdentityServiceOpen-5.0.0.3895-linux-i386-rpm-installer</span><br />
c) <span style="font-family:courier new;">./LikewiseIdentityServiceOpen-5.0.0.3895-linux-i386-rpm-installer</span></li>
<li>Join the domain (as root):<br />
a) <span style="font-family:courier new;">/opt/likewise/bin/domainjoin-cli join mydomain.com administrator</span><br />
b) Where administrator is a user with privileges to join a computer to the domain</li>
<li>Customize Likewise to use the mounted home directories (automount of home directories explained in step 5).  It is important to do this before logging in, because once users have logged in you can&#8217;t change the home directory without reinitializing likewise:<br />
a) in /etc/likewise/lsassd.conf edit the following:<br />
i) Change the homedirecy path:  <span style="font-family:courier new;">homedir-template = %H/users/%U</span><br />
ii) Make sure it doesn&#8217;t mess up a home directory: <span style="font-family:courier new;">create-homedir = no</span><br />
iii) Make it so when logging in the domain does not have to be specified:  <span style="font-family:courier new;">assume-default-domain = yes</span><br />
iv) Changed the shell to bash: <span style="font-family:courier new;">login-shell-template = /bin/bash</span></li>
<li>Set up automount to mount people&#8217;s home directories which live on a NFS server:<br />
a) Add the following to /etc/auto.master: <span style="font-family:courier new;">/home/users /etc/auto.home &#8211;timeout 60</span><br />
b) Create auto.home and enter the following into the file: <span style="font-family:courier new;">* -rw [nfs_server_ip]:/dir_where_homes_are/&amp;</span><br />
c) restart autofs: <span style="font-family:courier new;">/etc/init.d/autofs restart</span><br />
d) The home directories will not appear until you change directory into them, hence <span style="font-style: italic;">auto</span>mount</li>
<li>Migrate from NIS:<br />
a) After a successful login with a windows username type the <span style="font-family:courier new;">id</span> command and note the users <a href="http://en.wikipedia.org/wiki/User_identifier_%28Unix%29" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://en.wikipedia.org/wiki/User_identifier_%28Unix%29');">UID</a> number.  The UID number is what Unix cares about, the name isn&#8217;t important.  The UID that Likewise generates is a hashed version of the <a href="http://en.wikipedia.org/wiki/Security_Identifier" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://en.wikipedia.org/wiki/Security_Identifier');">Windows SID</a>.<br />
b) Log into your Windows domain controller.  Click the user properties and then in the &#8220;Unix Properties&#8221; tab change the UID to match what Likewise generated.  This way servers that are still on NIS will be consistent with Likewise Open.<br />
c) Reown the users home directory with the new UID: chown -R [UID] /home/users/[user]</li>
<li>Optional:  Change users shell<br />
a) Since everyone with Likewise uses the same shell, if you like a different shell like zsh you can put the following in /home/users/[user]/.profile : <span style="font-family:courier new;">if which zsh; then; exec zsh; fi</span><br />
b) The exec command replaces the current shell with whatever command you specify, so you won&#8217;t be running zsh within a bash process.</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.kbrandt.com/2008/11/authenticating-with-active-directory.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
