Samba4/LDAP Backend/Samba 4 alpha 9 with Fedora DS


This page describes how to install the Samba 4 alpha 9 with Fedora DS 1.2.3 or later on Fedora Core 10.

Building Samba


The following packages are needed to build and run Samba:

% yum install gcc git autoconf make python-devel perl-LDAP phpldapadmin

Getting the Source Code

Download the source code into a source directory (SRC_DIR).

% cd SRC_DIR
% git clone git://
% cd samba

Building Samba

Follow these steps to build Samba:

% cd SRC_DIR/samba/source4
% ./
% ./configure.developer
% make
% make install

By default it will install Samba in /usr/local/samba (INSTALL_DIR).

Installing Fedora DS

% yum install fedora-ds

Configuring Samba

Create INSTALL_DIR/etc/smb.conf, for example:

        netbios name     = samba1
        workgroup        = EXAMPLE
        realm            = EXAMPLE.COM
        server role      = domain controller
        system:anonymous = yes

        path = INSTALL_DIR/var/locks/sysvol/EXAMPLE.COM/scripts
        read only = no

        path = INSTALL_DIR/var/locks/sysvol
        read only = no


Execute the following command:

% cd SRC_DIR/samba/source4
% setup/provision \
--host-name=samba1 --root=root \
--domain=EXAMPLE --realm=EXAMPLE.COM \
--server-role="domain controller" \
--ldap-backend-type=fedora-ds \
--slapd-path=/usr/sbin/ns-slapd --setup-ds-path=/usr/sbin/

Optional Parameters:

  • --host-ip=<IP address>
  • --adminpass=<Samba password>
  • --krbtgtpass=<Kerberos password>
  • --machinepass=<Machine password>
  • --ldapadminpass=<LDAP backend password>
Server Role:    domain controller
Hostname:       samba1
DOMAIN SID:     S-1-5-21-3267683637-1467708756-1094392362
Admin password: Secret123

Starting Fedora DS

% cd INSTALL_DIR/private/ldap/slapd-samba4
% ./start-slapd

Verify with the following command:

% ldapsearch -H ldapi://%2Fusr%2Flocal%2Fsamba%2Fprivate%2Fldap%2Fldapi -x -D "CN=Manager,DC=EXAMPLE,DC=COM" -W -b "" -s base \* +

Starting Samba

% cd INSTALL_DIR/sbin
% ./samba -i -M single -d 3

Verify with the following command:

% ldapsearch -h localhost -p 389 -x -D "CN=Administrator,CN=Users,DC=EXAMPLE,dc=COM" -W -b "" -s base \* +

Configuring DNS

DNS needs to be configured before joining a client or a replica. See this page.