Samba

Samba 2.2.3 heeft LDAP samdb code die getest is met OpenLDAP 2.0 server en client libraries. Het zou ook moeten werken met Netscape's directory server en client SDK, maar dat is niet intensief getest. Netscape directory server is iPlanet, en iPlanet is de oude naam van Sun ONE Directory server. De Netscape LDAP SDK is nu in handen van Mozilla.
Samba 3.0 heeft ActiveDirectory support.

Installatie van Samba met OpenLDAP:

Voor het toevoegen van de ondersteuning van het sambaAccount object in de OpenLDAP directory server moet eerst het bestand samba.schema gekopieerd worden naar de slapd configuratie directory.
root# cp samba.schema /etc/openldap/schema/
Daarna moet samba.schema aan slapd.conf worden toegevoegd. Het sambaAccount object bevat 2 attributen die afhankelijk zijn van de schema bestanden. Het 'uid' attribuut is gedefineerd in cosine.schema en het 'displayName' attribuut is gedefineerd in het inetorgperson.schema bestand. Beide moeten voor het samba .schema bestand worden geïmporteerd.

## /etc/openldap/slapd.conf

## schema files (core.schema is required by default)
include            /etc/openldap/schema/core.schema

## needed for sambaAccount
include            /etc/openldap/schema/cosine.schema
include            /etc/openldap/schema/inetorgperson.schema
include            /etc/openldap/schema/samba.schema

## uncomment this line if you want to support the 
## RFC2307 (NIS) schema
## include         /etc/openldap/schema/nis.schema

....

Het wordt aangeraden dan dat je een indexen van de meest gebruikte attributen maakt, zoals het volgende voorbeeld. Daardoor gaat het zoeken op sambaAccount sneller (en mogelijk ook posixAccount en posixGroup).

# Indices to maintain
## required by OpenLDAP 2.0
index objectclass   eq

## support pbb_getsampwnam()
index uid           pres,eq
## support pdb_getsampwrid()
index rid           eq

## uncomment these if you are storing posixAccount and
## posixGroup entries in the directory as well
##index uidNumber     eq
##index gidNumber     eq
##index cn            eq
##index memberUid     eq

Voorbeeld smb.conf:

[global]
     security = user
     encrypt passwords = yes

     netbios name = TASHTEGO
     workgroup = NARNIA

     # ldap related parameters

     # define the DN to use when binding to the directory servers
     # The password for this DN is not stored in smb.conf.  Rather it
     # must be set by using 'smbpasswd -w secretpw' to store the
     # passphrase in the secrets.tdb file.  If the "ldap admin dn" values
     # changes, this password will need to be reset.
     ldap admin dn = "cn=Samba Manager,ou=people,dc=samba,dc=org"

     #  specify the LDAP server's hostname (defaults to locahost)
     ldap server = ahab.samba.org

     # Define the SSL option when connecting to the directory
     # ('off', 'start tls', or 'on' (default))
     ldap ssl = start tls

     # define the port to use in the LDAP session (defaults to 636 when
     # "ldap ssl = on")
     ldap port = 389

     # specify the base DN to use when searching the directory
     ldap suffix = "ou=people,dc=samba,dc=org"

     # generally the default ldap search filter is ok
     # ldap filter = "(&(uid=%u)(objectclass=sambaAccount))"
Voor meer informatie over Samba+LDAP:
http://samba.irc.gr/samba/ftp/docs/htmldocs/Samba-LDAP-HOWTO.html
http://www.mandrakesecure.net/en/docs/samba-pdc.php
http://www.mandrakesecure.net/en/docs/samba-ldap-advanced.php
http://www.unav.es/cti/ldap-smb/ldap-smb-2_2-howto.html
http://www.unav.es/cti/ldap-smb/smb-ldap-3-howto.html
http://www.unav.es/cti/ldap-smb/ldap-smb-TNG-howto.html
Daniel van Eeden 2004-11-02