CentOS 5.x Samba Domain Controller

This entry was posted in Networking and tagged , , on June 17, 2012, by

This will show you how to set up a Samba Domain Controller with a local LDAP backend, using CentOS 5.x (tested on 5.3, still successfully running on 5.4).  Includes a web-interface for managing LDAP users/groups/etc.

Disable selinux:

It will only cause problems, I’m not going to mess with SELinux in this guide other than disabling it.

Install some tools

rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-3.noarch.rpm
yum update

yum install openldap-servers nss_ldap samba httpd openssl mod_ssl mysql mysql-server php php-xml php-ldap php-mysql php-pdo php-cli php-common smbldap-tools

Installing smbldap-tools this way should install all the dependent perl modules, however the version available on yum has some bugs, so we’ll upgrade to the latest version afterwards, keeping the dependencies, but overwriting the smbldap-tools package:

rpm -Uvh http://download.gna.org/smbldap-tools/packages/smbldap-tools-0.9.5-1.noarch.rpm

Set up the hostname

For our purposes in this guide, we are calling the server’s hostname “dc1” and the domain “DOMAINNAME”. Note: If you want to use your fqdn for your Samba domain, wherever you see ,dc=DOMAINNAME below, replace it with ,dc=example,dc=com, assuming your fqdn is example.com. Also note that “root” will be the samba administrator username, if you don’t like that, change it as well. Related lines are: cn=root and cn: root

Within /etc/hosts, add or replace your line (following the file’s format, assuming 192.168.0.5 is your server’s network-accessible IP):

Leave a Reply

Your email address will not be published. Required fields are marked *

Copyright 2017 ©Aceadmins. All rights reserved.