#
# See slapd.conf(5) for details on configuration options.
# This file should NOT be world readable.
#
include /etc/openldap/schema/core.schema
include /etc/openldap/schema/cosine.schema
include /etc/openldap/schema/inetorgperson.schema
include /etc/openldap/schema/nis.schema
include /etc/openldap/schema/samba.schema
# -1 is all messages 296 is a good compromise for most debugging
#loglevel -1
pidfile /var/run/slapd.pid
argsfile /var/run/slapd.args
# The following three lines are related to security. Leave them commented out now.
# We uncomment them and enable security *after* we have successfully tested Samba with
# LDAP in an unsecured configuration. Debugging is infinitely easier without encryption
# enabled.
#TLSCipherSuite HIGH
#TLSCertificateFile /etc/openldap/slapd-cert.pem
#TLSCertificateKeyFile /etc/openldap/slapd-key.pem
database bdb
# MODIFY
# Modify suffix and rootdn to match your domain name.
suffix "dc=somedomain,dc=com"
rootdn "cn=Manager,dc=somedomain,dc=com"
# MODIFY
# Use the following to generate:
# slappasswd -h {SSHA} -s <your password here>
rootpw {SSHA}kCuJt72QLJ2O06nFUvdre97sHT0AxlH/
# MODIFY
# The database directory MUST exist prior to running slapd AND
# should only be accessible by the slapd and slap tools.
# Mode 700 recommended with an owner of ldap and a group of ldap
directory /var/lib/ldap/somedomain.com
# Indices to maintain for this database
index objectClass eq
index cn pres,sub,eq
index sn pres,sub,eq
index uid pres,sub,eq
index displayName pres,sub,eq
index uidNumber eq
index gidNumber eq
index memberUID eq
index sambaSID eq
index sambaPrimaryGroupSID eq
index sambaDomainName eq
index default sub
# Access Control Entries
# Note these ACEs are duplicated from the IDEALX smbldap usermanual with one exception
# users can authenticate and change their password access to attrs=userPassword,
sambaNTPassword,sambaLMPassword,sambaPwdLastSet,sambaPwdMustChange
by dn="uid=samba,ou=Users,dc=somedomain,dc=com" write
by self write
by anonymous auth
by * none
# some attributes need to be readable anonymously so that 'id user' can answer correctly
access to attrs=objectClass,entry,gecos,homeDirectory,uid,uidNumber,gidNumber,cn,
memberUid
by dn="uid=samba,ou=Users,dc=somedomain,dc=com" write
by * read
# somme attributes can be writable by users themselves
access to attrs=description,telephoneNumber
by dn="uid=samba,ou=Users,dc=somedomain,dc=com" write
by self write
by * read
# some attributes need to be writable for samba (this ACE modified from original to allow
some unix commands to work) access to attrs=cn,sambaLMPassword,sambaNTPassword,
sambaPwdLastSet,sambaLogonTime,sambaLogoffTime,sambaKickoffTime,sambaPwdCanChange,
sambaPwdMustChange,sambaAcctFlags,displayName,sambaHomePath,sambaHomeDrive,
sambaLogonScript,sambaProfilePath,description,sambaUserWorkstations,sambaPrimaryGroupSID,
sambaDomainName,sambaSID,sambaGroupType,sambaNextRid,sambaNextGroupRid,sambaNextUserRid,
sambaAlgorithmicRidBase,sambaLogonScript,loginShell
by dn="uid=samba,ou=Users,dc=somedomain,dc=com" write
by self read
by * none
# samba need to be able to create the samba domain account
access to dn.base="dc=somedomain,dc=com"
by dn="uid=samba,ou=Users,dc=somedomain,dc=com" write
by * none
# samba need to be able to create new users account
access to dn="ou=Users,dc=somedomain,dc=com"
by dn="uid=samba,ou=Users,dc=somedomain,dc=com" write
by * none
# samba need to be able to create new groups account
access to dn="ou=Groups,dc=somedomain,dc=com"
by dn="uid=samba,ou=Users,dc=somedomain,dc=com" write
by * none
# samba need to be able to create new computers account
access to dn="ou=Computers,dc=somedomain,dc=com"
by dn="uid=samba,ou=Users,dc=somedomain,dc=com" write
by * none
# this can be omitted but we leave it: there could be other branch
# in the directory
access to *
by self read
by * none
|