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.
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 Windows File Server package in the Package Management tool.
Setup and Configure Winbind

1. Click Applications, select System Settings and click Authentication. This will launch the Authentication Configuration window.
2. Check the Enable Winbind Support and click Configure Winbind. This will launch the Winbind Settings window.

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’ clock and the mail server’s clock is not more than five minutes.

4. Click Join Winbind Domain. You will be asked to save your changes, click Save. In the Joining Winbind Domain window, fill in the Domain Administrator and Password. Click Ok when you are done. Click Ok again to close the Winbind Settings window.
5. Click the Authentication tab and check the Enable Winbind Support and Local authorization is sufficient for local users. Click Ok when you are done.
6. Open the file /etc/samba/smb.conf for editing and change winbind use default domain to yes.winbind use default domain = yes

7. Create the folder that will contain the home directory of the Active Directory users. From the terminal window, type in the commands below.mkdir /home/DOMAIN chmod 777 /home/DOMAIN
We changed the directory permission to 777, meaning anyone can read, write and execute because the users’ 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.

8. Restart the winbind service. Learn how to restart services here.Test the Active Directory Integration

3. Finally, type in getent passwd. You should see the Linux system accounts along with the Active Directory user accounts.
If it doesn’t work, visit the Active Directory Troubleshooting page.
Reconfiguring Postfix and Dovecot to Create the Home Directory
To store the mails, Postfix and Dovecot needs to create the username/Maildir directory. Postfix can create the Maildir directory and all the necessary parent directories. Unfortunately, Dovecot can only create the mail directory which in this case is Maildir and will fail if the parent directory username does not exist. Thus, we need to reconfigure Postfix and Dovecot to skip the Maildir directory and store the mails directly into the username directory which is the user’s home directory.

3. Restart Postfix or MailScanner (depends if you installed MailScanner) and Dovecot. Learn how to restart services here.That’s it. The home directory should be now automatically created by Postfix and Dovecot whenever you receive or retrieve mails.
***
Posted on 3/19/2007 and last updated on 11/9/2007
Filed under Active Directory , CentOS 4 , Red Hat Enterprise Linux 4 , Samba



