Installing SaMBa with OpenLDAP support

From SaruWiki
Revision as of 14:41, 21 November 2008 by Saruman! (talk | contribs) (put in schema change)
Jump to navigation Jump to search

The Samba Section

Preparations

First off, get yourself this wonderful book - and READ IT. Next, make sure our user backend of choice, OpenLDAP, is properly installed and can be used to authenticate users. If you haven't yet installed OpenLDAP, go to the relevant section of this wiki, and get going. Make sure your OpenLDAP is running well.

Software installation

This is easy: using aptitude, install the packages samba, samba-tools and samba-doc - note that we NEED samba-doc, as this package contains a configuration file that we need.

As usual, Debian is asking us for the configuration details. For SaMBa 3.2, there are only two simple questions:

  • What do you want to be your Windows workgroup name? (we provide the name "AMBER")
  • Do you want to modify smb.conf to use WINS setting from DHCP? (we provide "yes")

OpenLDAP adaptation

In order for our OpenLDAP server to recognise the SaMBa-specific attributes that we're going to use, we need to add the "samba" schema to the OpenLDAP server. After installation of samba-doc, we can find this schema in /usr/share/doc/samba-doc/examples/LDAP, where it sits gzipped between some other schema files; as the README explains, what we need is samba.schema.gz, so we unzip it and copy it to our OpenLDAP schema directory

cd /usr/share/doc/samba-doc/examples/LDAP
gunzip samba.schema.gz
cp samba.schema /etc/ldap/schema

Next up, we include this schema into our LDAP configuration, by adding the following line to /etc/ldap/slapd.conf:

include         /etc/ldap/schema/samba.schema

After this addition, we'll need to restart our LDAP server:

/etc/init.d/slapd restart