<?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>Linux Mail Server Setup and Howto Guide &#187; Samba</title>
	<atom:link href="http://www.linuxmail.info/category/samba/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.linuxmail.info</link>
	<description>Rapidly deploy Linux based mail solutions today</description>
	<lastBuildDate>Tue, 01 Nov 2011 00:43:33 +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>Troubleshooting Active Directory and Winbind</title>
		<link>http://www.linuxmail.info/troubleshooting-active-directory-centos-5/</link>
		<comments>http://www.linuxmail.info/troubleshooting-active-directory-centos-5/#comments</comments>
		<pubDate>Wed, 25 Apr 2007 15:56:19 +0000</pubDate>
		<dc:creator>consultant</dc:creator>
				<category><![CDATA[Active Directory]]></category>
		<category><![CDATA[Kerberos]]></category>
		<category><![CDATA[Samba]]></category>

		<guid isPermaLink="false">http://www.linux-mail.info/troubleshooting-active-directory-centos-5/</guid>
		<description><![CDATA[How to troubleshoot Active Directory integration in Red Hat Enterprise Linux 5 or CentOS 5]]></description>
			<content:encoded><![CDATA[<p>If you weren&#8217;t able to succeed in integrating Active Directory into Linux, don&#8217;t worry. This article will show you how to test the Kerberos authentication and join the Active Directory domain manually so you can identify the problem.</p>
<span id="more-43"></span>
<div class="post-info-spacing"><script type="text/javascript">google_ad_client="pub-3384844279561399";google_ad_slot="5340126843";google_ad_width=336;google_ad_height=280;</script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script></div>

<p>Launch the terminal window and type in the highlighted items below.</p>
<h2 id="test-kerberos">Test the Kerberos authentication</h2>
<p>Kerberos is an authentication mechanism used by Active Directory to verify user or host identity. We will use <em>kinit</em>, an executable used to obtain Kerberos access granting ticket, to test the Kerberos authentication mechanism.</p>
<pre class="steps">[root@mail ~]# <strong>kinit bugsbunny</strong></pre>
<p>Change <em>bugsbunny</em> to any Active Directory user account.</p>
<p>If it replies</p>
<ul>
<li><em>Cannot resolve network address for KDC in requested realm while getting initial credentials</em><br /><p>DNS problem, check the DNS or use ip addresses in the Domain Controllers field of the Winbind Settings.</p></li>
<li><em>Cannot find KDC for requested realm while getting initial credentials</em><br /><p>Check the spelling of your Active Directory realm and check the spelling in Winbind Settings. Capitalization is important.</p></li>
<li><em>Client not found in Kerberos database while getting initial credentials</em><br /><p>Check the user name you used if it exists in Active Directory.</p></li>
<li><em>Cannot contact any KDC for requested realm while getting initial credentials</em><br /><p>Check if the domain controller you specified in Winbind Settings is indeed working is not firewalled.</p></li>
</ul>
<p><a href="/active-directory-integration-samba-centos-5/#winbind-settings">See Winbind Setting for RHEL/CentOS 5</a><br />
<a href="/active-directory-integration-samba-centos-4/#winbind-settings">See Winbind Setting for RHEL/CentOS 4</a></p>
<pre class="steps">Password for bugsbunny@ACME.LOCAL: <strong>type in the password here</strong>
</pre>
<p>If it replies</p>
<ul>
<li><em>Preauthentication failed while getting initial credentials</em><br /><p>It means the password is wrong.</p></li>
<li><em>Password has expired while getting initial credentials</em><br /><p>The password is no longer valid and needs to be changed.</p></li>
<li><em>Clock skew too great while getting initial credentials</em><br /><p>Synchronize your clocks using NTP. For a quick and temporary fix, use <strong>net time set</strong> to synchronize time with the domain controller.</p>
<p>To permanently fix the problem, both the Active Directory server and the Linux server should synchronize their time with an NTP server. See <a href="/synchronize-system-clock-centos-5/">how to synchronize system clock in Linux.</a> For Windows, use the command</p>
<pre class="steps">
net time /setsntp:"0.pool.ntp.org 1.pool.ntp.org"
</pre>
<p>Replace &#8220;0.pool.ntp.org &#8230;&#8221; with your preferred NTP server.</p></li>
<li><em>KDC reply did not match expectations while getting initial credentials</em><br /><p>Make sure the realm is correct and capitalized in <em>/etc/krb5.conf</em>. If the realm is <em>ACME.LOCAL</em>, this error will appear if <em>ACME</em>, <em>acme</em>, <em>acme.local</em> is used as the realm.</p></li>
</ul>
<h2>Join the Active Directory Domain</h2>
<pre class="steps">[root@mail ~]# <strong>net ads join -U administrator</strong></pre>
<p>Replace <strong>administrator</strong> with any user name having Domain Admin rights. Specify your password when asked. You should be able to join the Active Directory domain now. </p>
<h2>Restart winbind</h2>
<p>After successfully joining, you need to restart winbind using the command below. </p>
<pre class="steps">[root@mail ~]# <strong>service winbind restart</strong></pre>
]]></content:encoded>
			<wfw:commentRss>http://www.linuxmail.info/troubleshooting-active-directory-centos-5/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Active Directory Integration with Samba for RHEL/CentOS 5</title>
		<link>http://www.linuxmail.info/active-directory-integration-samba-centos-5/</link>
		<comments>http://www.linuxmail.info/active-directory-integration-samba-centos-5/#comments</comments>
		<pubDate>Wed, 25 Apr 2007 14:36:07 +0000</pubDate>
		<dc:creator>consultant</dc:creator>
				<category><![CDATA[Active Directory]]></category>
		<category><![CDATA[CentOS 5]]></category>
		<category><![CDATA[Red Hat Enterprise Linux 5]]></category>
		<category><![CDATA[Samba]]></category>

		<guid isPermaLink="false">http://www.linux-mail.info/active-directory-integration-samba-centos-5/</guid>
		<description><![CDATA[How to join the Active Directory domain in Red Hat Enterprise Linux 5 or CentOS 5 using Samba Winbind]]></description>
			<content:encoded><![CDATA[<p>This article will show you how to join your Linux server into the Active Directory domain, how to integrate the Active Directory user accounts into the Linux user accounts and how to authenticate users in Active Directory using Winbind, a component of Samba.</p>
<span id="more-42"></span>
<div class="post-info-spacing"><script type="text/javascript">google_ad_client="pub-3384844279561399";google_ad_slot="5340126843";google_ad_width=336;google_ad_height=280;</script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script></div>

<div class="clearfix steps"><img class="icon32x32 left" alt="Important" src="/images/emblem-important.png" />A better way to integrate Active Directory into your Linux mail server is by using <a href="/postfix-dovecot-ldap-centos-5/">Postfix&#8217;s Virtual User Accounts</a>.</div>
<div class="clearfix steps"><img class="icon32x32 left" alt="Note" src="/images/emblem-note.png" />Samba is installed by default when you select the Server installation type during the installation process. In case you need to install or reinstall it, just add the <em>Windows File Server</em> package located in the <em>Servers</em> category using the <a href="/how-to-add-remove-applications-centos-5/">Package Manager</a> tool.</div>
<h2>Setup and Configure Winbind</h2>
<div class="clearfix steps"><a href="/images/centos-5/authentication.png"><img class="preview" alt="Authentication" src="/images/centos-5/t-authentication.png" onmouseover="changeSrc(this)" /><img class="full" alt="" src="/images/busy.gif" /></a>1. Click <em>System</em>, select <em>Administration</em> and click <em>Authentication</em>. This will launch the <strong>Authentication Configuration</strong> window.</div>
<div class="clearfix steps"><a href="/images/centos-5/auth-config.png"><img class="preview" alt="Authentication" src="/images/centos-5/t-auth-config.png" onmouseover="changeSrc(this)" /><img class="full" alt="" src="/images/busy.gif" /></a>2. Check the <em>Enable Winbind Support</em> and click <em>Configure Winbind</em>. This will launch the <strong>Winbind Settings</strong> window.</div>
<div id="winbind-settings" class="clearfix steps"><a href="/images/centos-5/winbind-settings.png"><img class="preview" alt="Winbind Settings" src="/images/centos-5/t-winbind-settings.png" onmouseover="changeSrc(this)" /><img class="full" alt="" src="/images/busy.gif" /></a><div class="m">3. In the <strong>Winbind Settings</strong> window, set the <em>Security Model</em> to <em>ads</em> and fill in the <em>Winbind Domain</em>, <em>Winbind ADS Realm</em> and <em>Winbind Domain Controllers</em>. See sample settings below.</div>
<div>&nbsp;</div>
<div class="m">
    <div class="fw">Winbind Domain</div><div>acme</div>
    <div class="fw">Winbind ADS Realm</div><div>acme.local</div>
    <div class="fw">Domain Controllers</div><div>server1.acme.local,server2.acme.local</div>
</div>
</div>
<div class="clearfix steps"><img class="icon32x32 left" alt="Note" src="/images/emblem-note.png" />If you would like to allow your Active Directory users to login to your Linux system, change <strong>Template Shell</strong> to <em>/bin/bash</em>.</div>
<div class="clearfix steps"><img class="icon32x32 left" alt="Important" src="/images/emblem-important.png" />To ensure the success of the Active Directory integration, make sure that your Active Directory DNS is working, you are using the Active Directory DNS, you can ping the domain controllers and that the difference between the domain controllers&#8217; clock and the mail server&#8217;s clock is not more than five minutes.</div>
<div class="clearfix steps"><a href="/images/centos-5/join-winbind.png"><img class="preview" alt="Join Winbind Domain" src="/images/centos-5/t-join-winbind.png" onmouseover="changeSrc(this)" /><img class="full" alt="" src="/images/busy.gif" /></a>4. Click <em>Join Winbind Domain</em>. You will be asked to save your changes, click <em>Save</em>. In the <strong>Joining Winbind Domain</strong> window, fill in the <em>Domain Administrator</em> and <em>Password</em>. Click <em>Ok</em> when you are done. Click <em>Ok</em> again to close the <strong>Winbind Settings</strong> window.</div>
<div class="clearfix steps"><a href="/images/centos-5/auth-config-2.png"><img class="preview" alt="Authentication Configuration" src="/images/centos-5/t-auth-config-2.png" onmouseover="changeSrc(this)" /><img class="full" alt="" src="/images/busy.gif" /></a>5. Click the <em>Authentication</em> tab and check the <em>Enable Winbind Support</em>.</div>
<div class="clearfix steps"><a href="/images/centos-5/auth-config-3.png"><img class="preview" alt="Authentication Configuration" src="/images/centos-5/t-auth-config-3.png" onmouseover="changeSrc(this)" /><img class="full" alt="" src="/images/busy.gif" /></a>6. Click the <em>Options</em> tab and check the <em>Local authorization is sufficient for local users</em>. Click <em>Ok</em> when you are done.</div>
<div class="clearfix steps"><a href="/images/centos-5/edit-smb-conf.png"><img class="preview" alt="Edit smb.conf" src="/images/centos-5/t-edit-smb-conf.png" onmouseover="changeSrc(this)" /><img class="full" alt="" src="/images/busy.gif" /></a>7. Open the file <em>/etc/samba/smb.conf</em> for editing and change the key values below.<div class="m"><pre class="steps">winbind use default domain = yes
winbind enum users = yes
winbind enum groups = yes
obey pam restrictions = yes
allow trusted domains = no
idmap backend = idmap_rid:acme=16777216-33554431
</pre>
</div>
For the last line, replace <em>acme</em> with the value of <em>workgroup</em> and ensure that the range matches your <em>idmap uid</em> range.
</div>
<div class="clearfix steps"><img class="icon32x32 left" alt="Note" src="/images/emblem-note.png" />The last line activates algorithmic mapping of the Windows IDs to Unix IDs. This enables you to use Samba across several Linux machines or recreate a corrupted mapping database since the mapping is consistent.</div>
<div class="clearfix steps"><a href="/images/centos-5/smb-home-dir.png"><img class="preview" alt="Service Configuration" src="/images/centos-5/t-smb-home-dir.png" onmouseover="changeSrc(this)" /><img class="full" alt="" src="/images/busy.gif" /></a>8. Create the folder that will contain the home directory of the Active Directory users. From the terminal window, type in the commands below.<div class="m"><pre class="steps">mkdir /home/DOMAIN</pre></div><div class="m">Replace <em>DOMAIN</em> with your domain. Make sure to capitalize your domain like <em>ACME</em> in our example.</div></div>
<div class="clearfix steps"><a href="/images/centos-5/edit-system-auth.png"><img class="preview" alt="Service Configuration" src="/images/centos-5/t-edit-system-auth.png" onmouseover="changeSrc(this)" /><img class="full" alt="" src="/images/busy.gif" /></a>9. Edit the file <em>/etc/pam.d/system-auth</em> and add the line below.</div>
<pre class="steps">session required pam_oddjob_mkhomedir.so skel=/etc/skel/ umask=0022</pre>
<div class="steps">This will automatically create the user&#8217;s home directory whenever a PAM session is opened. Winbind and Dovecot will be opening the PAM session thus automatically creating the user&#8217;s home directory.</div>
<div class="clearfix steps"><a href="/images/centos-5/service-config.png"><img class="preview" alt="Service Configuration" src="/images/centos-5/t-service-config.png" onmouseover="changeSrc(this)" /><img class="full" alt="" src="/images/busy.gif" /></a>10. Restart the <em>winbind</em> service and start the <em>oddjobd</em> service. <a href="/how-to-start-stop-services-centos-5/">Learn how to start and restart services here.</a></div>
<h2 id="test-active-directory">Test the Active Directory Integration</h2>
<div class="clearfix steps"><a href="/images/centos-5/wbinfo-u.png"><img class="preview" alt="Service Configuration" src="/images/centos-5/t-wbinfo-u.png" onmouseover="changeSrc(this)" /><img class="full" alt="" src="/images/busy.gif" /></a>1. From a terminal window, type in <tt>wbinfo -u</tt>. You should see the Active Directory user accounts.</div>
<div class="clearfix steps"><a href="/images/centos-5/wbinfo-a.png"><img class="preview" alt="Service Configuration" src="/images/centos-5/t-wbinfo-a.png" onmouseover="changeSrc(this)" /><img class="full" alt="" src="/images/busy.gif" /></a>2. Try the Active Directory authentication, type in <tt>wbinfo -a "username"%"password"</tt>.</div>
<div class="clearfix steps"><a href="/images/centos-5/getent-passwd.png"><img class="preview" alt="Service Configuration" src="/images/centos-5/t-getent-passwd.png" onmouseover="changeSrc(this)" /><img class="full" alt="" src="/images/busy.gif" /></a>3. Finally, type in <tt>getent passwd</tt>. You should see the Linux system accounts along with the Active Directory user accounts.</div>
<div class="clearfix steps"><img class="icon32x32 left" alt="Note" src="/images/emblem-note.png" />If it doesn&#8217;t work, visit the <a href="/troubleshooting-active-directory-centos-5/">Active Directory Troubleshooting</a> page.</div>
<p>&nbsp;</p>
<h2>Related Pages</h2>
<div class="clearfix steps"><a href="/images/windows-2003/imu-user-properties.png"><img class="preview" alt="User Property" src="/images/windows-2003/t-imu-user-properties.png" onmouseover="changeSrc(this)" /><img class="full" alt="" src="/images/busy.gif" /></a><a href="/active-directory-single-sign-on/">Active Directory Single Sign On</a>. Use Identity Management for Unix to control access on a per user account basis.</div>
<div class="left">&laquo;&laquo; Previous: <a href="/mailscanner-postfix-clamav-spamassassin-howto-centos-5/">MailScanner and Postfix Integration</a></div>
<div class="right">Next: <a href="/postfix-active-directory-ldap-lookup-howto/">Postfix AD Distribution List</a> &raquo;&raquo;</div>
<div class="clear">&nbsp;</div>]]></content:encoded>
			<wfw:commentRss>http://www.linuxmail.info/active-directory-integration-samba-centos-5/feed/</wfw:commentRss>
		<slash:comments>37</slash:comments>
		</item>
		<item>
		<title>Active Directory Integration with Samba in RHEL/CentOS 4</title>
		<link>http://www.linuxmail.info/active-directory-integration-samba-centos-4/</link>
		<comments>http://www.linuxmail.info/active-directory-integration-samba-centos-4/#comments</comments>
		<pubDate>Mon, 19 Mar 2007 15:31:41 +0000</pubDate>
		<dc:creator>consultant</dc:creator>
				<category><![CDATA[Active Directory]]></category>
		<category><![CDATA[CentOS 4]]></category>
		<category><![CDATA[Red Hat Enterprise Linux 4]]></category>
		<category><![CDATA[Samba]]></category>

		<guid isPermaLink="false">http://linux-mail.info/active-directory-integration-samba-centos-4/</guid>
		<description><![CDATA[How to join the Active Directory domain in Red Hat Enterprise Linux 4 or CentOS 4 using Samba Winbind]]></description>
			<content:encoded><![CDATA[<p>This page will show you how to join your Linux server into the Active Directory domain, how to integrate the Active Directory user accounts into the Linux user accounts and how to authenticate users in Active Directory using Winbind, a component of Samba.</p>
<span id="more-21"></span>
<div class="post-info-spacing"><script type="text/javascript">google_ad_client="pub-3384844279561399";google_ad_slot="5340126843";google_ad_width=336;google_ad_height=280;</script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script></div>

<div class="clearfix steps"><img class="icon32x32 left" alt="Note" src="/images/emblem-note.png" />Samba is installed by default when you select the Server installation type during the installation process. In case you need to install or reinstall it, just select the <em>Windows File Server</em> package in the <a href="/how-to-add-remove-applications-centos-4/">Package Management tool</a>.</div>
<h2>Setup and Configure Winbind</h2>
<div class="clearfix steps"><a href="/images/centos-4/authentication.png"><img class="preview" alt="Authentication" src="/images/centos-4/t-authentication.png" onmouseover="changeSrc(this)" /><img class="full" alt="" src="/images/busy.gif" /></a>1. Click <em>Applications</em>, select <em>System Settings</em> and click <em>Authentication</em>. This will launch the <strong>Authentication Configuration</strong> window.</div>
<div class="clearfix steps"><a href="/images/centos-4/auth-config.png"><img class="preview" alt="Authentication" src="/images/centos-4/t-auth-config.png" onmouseover="changeSrc(this)" /><img class="full" alt="" src="/images/busy.gif" /></a>2. Check the <em>Enable Winbind Support</em> and click <em>Configure Winbind</em>. This will launch the <strong>Winbind Settings</strong> window.</div>
<div id="winbind-settings" class="clearfix steps"><a href="/images/centos-4/winbind-settings.png"><img class="preview" alt="Winbind Settings" src="/images/centos-4/t-winbind-settings.png" onmouseover="changeSrc(this)" /><img class="full" alt="" src="/images/busy.gif" /></a><div class="m">3. In the <strong>Winbind Settings</strong> window, set the <em>Security Model</em> to <em>ads</em> and fill in the <em>Winbind Domain</em>, <em>Winbind ADS Realm</em> and <em>Winbind Domain Controllers</em>. See sample settings below.</div>
<div>&nbsp;</div>
<div class="m">
    <div class="fw">Winbind Domain</div><div>acme</div>
    <div class="fw">Winbind ADS Realm</div><div>acme.local</div>
    <div class="fw">Domain Controllers</div><div>server1.acme.local,server2.acme.local</div>
</div>
</div>
<div class="clearfix steps"><img class="icon32x32 left" alt="Important" src="/images/emblem-important.png" />To ensure the success of the Active Directory integration, make sure that you can ping the domain controllers and that the difference between the domain controllers&#8217; clock and the mail server&#8217;s clock is not more than five minutes.</div>
<div class="clearfix steps"><a href="/images/centos-4/join-winbind.png"><img class="preview" alt="Join Winbind Domain" src="/images/centos-4/t-join-winbind.png" onmouseover="changeSrc(this)" /><img class="full" alt="" src="/images/busy.gif" /></a>4. Click <em>Join Winbind Domain</em>. You will be asked to save your changes, click <em>Save</em>. In the <strong>Joining Winbind Domain</strong> window, fill in the <em>Domain Administrator</em> and <em>Password</em>. Click <em>Ok</em> when you are done. Click <em>Ok</em> again to close the <strong>Winbind Settings</strong> window.</div>
<div class="clearfix steps"><a href="/images/centos-4/auth-config2.png"><img class="preview" alt="Authentication Configuration" src="/images/centos-4/t-auth-config2.png" onmouseover="changeSrc(this)" /><img class="full" alt="" src="/images/busy.gif" /></a>5. Click the <em>Authentication</em> tab and check the <em>Enable Winbind Support</em> and <em>Local authorization is sufficient for local users</em>. Click <em>Ok</em> when you are done.</div>
<div class="clearfix steps"><a href="/images/centos-4/smb-conf.png"><img class="preview" alt="Edit smb.conf" src="/images/centos-4/t-smb-conf.png" onmouseover="changeSrc(this)" /><img class="full" alt="" src="/images/busy.gif" /></a>6. Open the file <em>/etc/samba/smb.conf</em> for editing and change <em>winbind use default domain</em> to <em>yes</em>.<div class="m"><pre class="steps">winbind use default domain = yes</pre></div></div>
<div class="clearfix steps"><a href="/images/centos-4/smb-home-dir.png"><img class="preview" alt="Service Configuration" src="/images/centos-4/t-smb-home-dir.png" onmouseover="changeSrc(this)" /><img class="full" alt="" src="/images/busy.gif" /></a>7. Create the folder that will contain the home directory of the Active Directory users. From the terminal window, type in the commands below.<div class="m"><pre class="steps">mkdir /home/DOMAIN
chmod 777 /home/DOMAIN</pre></div><div class="m">Replace <em>DOMAIN</em> with your domain. Make sure to capitalize your domain like <em>ACME</em> in our example.</div></div>
<div class="clearfix steps"><img class="icon32x32 left" alt="Note" src="/images/emblem-note.png" />We changed the directory permission to 777, meaning anyone can read, write and execute because the users&#8217; home directory will be created later by Postfix or Dovecot when a mail is received or a user checks his email. The created home directory on the other hand will have its permission set to read, write and execute by the owner only.</div>
<div class="clearfix steps"><a href="/images/centos-4/service-config.png"><img class="preview" alt="Service Configuration" src="/images/centos-4/t-service-config.png" onmouseover="changeSrc(this)" /><img class="full" alt="" src="/images/busy.gif" /></a>8. Restart the winbind service. <a href="/how-to-start-stop-services-centos-4/">Learn how to restart services here.</a></div>
<h2 id="test-active-directory">Test the Active Directory Integration</h2>
<div class="clearfix steps"><a href="/images/centos-4/wbinfo-u.png"><img class="preview" alt="Service Configuration" src="/images/centos-4/t-wbinfo-u.png" onmouseover="changeSrc(this)" /><img class="full" alt="" src="/images/busy.gif" /></a>1. From a terminal window, type in <tt>wbinfo -u</tt>. You should see the Active Directory user accounts.</div>
<div class="clearfix steps"><a href="/images/centos-4/wbinfo-a.png"><img class="preview" alt="Service Configuration" src="/images/centos-4/t-wbinfo-a.png" onmouseover="changeSrc(this)" /><img class="full" alt="" src="/images/busy.gif" /></a>2. Try the Active Directory authentication, type in <tt>wbinfo -a "username"%"password"</tt>.</div>
<div class="clearfix steps"><a href="/images/centos-4/getent-passwd.png"><img class="preview" alt="Service Configuration" src="/images/centos-4/t-getent-passwd.png" onmouseover="changeSrc(this)" /><img class="full" alt="" src="/images/busy.gif" /></a>3. Finally, type in <tt>getent passwd</tt>. You should see the Linux system accounts along with the Active Directory user accounts.</div>
<div class="clearfix steps"><img class="icon32x32 left" alt="Note" src="/images/emblem-note.png" />If it doesn&#8217;t work, visit the <a href="/troubleshooting-active-directory-centos-5/">Active Directory Troubleshooting</a> page.</div>
<h2 id="reconfigure">Reconfiguring Postfix and Dovecot to Create the Home Directory</h2>
<p>To store the mails, Postfix and Dovecot needs to create the <em>username/Maildir</em> directory. Postfix can create the <em>Maildir</em> directory and all the necessary parent directories. Unfortunately, Dovecot can only create the mail directory which in this case is <em>Maildir</em> and will fail if the parent directory <em>username</em> does not exist. Thus, we need to reconfigure Postfix and Dovecot to skip the <em>Maildir</em> directory and store the mails directly into the <em>username</em> directory which is the user&#8217;s home directory.</p>
<div class="clearfix steps"><a href="/images/centos-4/edit-main-cf3.png"><img class="preview" alt="Edit main.cf" src="/images/centos-4/t-edit-main-cf3.png" onmouseover="changeSrc(this)" /><img class="full" alt="" src="/images/busy.gif" /></a>1. Edit the file <em>/etc/postfix/main.cf</em> and change the line below.<div class="m"><pre class="steps">home_mailbox = /</pre></div></div>
<div class="clearfix steps"><a href="/images/centos-4/dovecot-conf2.png"><img class="preview" alt="Edit dovecot.conf" src="/images/centos-4/t-dovecot-conf2.png" onmouseover="changeSrc(this)" /><img class="full" alt="" src="/images/busy.gif" /></a>2. Edit the file <em>/etc/dovecot.conf</em> and change the line below.<div class="m"></div><pre class="steps">default_mail_env = maildir:~/</pre></div>
<div class="clearfix steps"><a href="/images/centos-4/service-config-2.png"><img class="preview" alt="Service Configuration" src="/images/centos-4/t-service-config-2.png" onmouseover="changeSrc(this)" /><img class="full" alt="" src="/images/busy.gif" /></a>3. Restart Postfix or MailScanner (depends if you installed MailScanner) and Dovecot. <a href="/how-to-start-stop-services-centos-4/">Learn how to restart services here.</a></div>
<p>That&#8217;s it. The home directory should be now automatically created by Postfix and Dovecot whenever you receive or retrieve mails.</p>
<div class="left">&laquo;&laquo; Previous: <a href="/mailscanner-postfix-clamav-spamassassin-howto-centos-4/">MailScanner and Postfix Integration</a></div><div class="right">Next: <a href="/postfix-active-directory-ldap-lookup-howto/">Postfix AD Distribution List</a> &raquo;&raquo;</div>
<div style="clear: both">&nbsp;</div>]]></content:encoded>
			<wfw:commentRss>http://www.linuxmail.info/active-directory-integration-samba-centos-4/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

