Samba4/LDAP Backend/Samba 4 alpha 9 with Fedora DS
(Redirected from Samba4/LDAP Backend/Fedora DS 1.2.3)
Contents
Overview
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
Prerequisites
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://git.samba.org/samba.git % cd samba
Building Samba
Follow these steps to build Samba:
% cd SRC_DIR/samba/source4 % ./autogen.sh % ./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:
[globals] netbios name = samba1 workgroup = EXAMPLE realm = EXAMPLE.COM server role = domain controller system:anonymous = yes [netlogon] path = INSTALL_DIR/var/locks/sysvol/EXAMPLE.COM/scripts read only = no [sysvol] path = INSTALL_DIR/var/locks/sysvol read only = no
Provisioning
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/setup-ds.pl
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 NetBIOS Domain: EXAMPLE DNS Domain: EXAMPLE.COM 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.