[global]
debuglevel = 10
unix charset = UTF8
# passdb backend = smbpasswd
passdb backend = ldapsam:ldap://ldapsandbox.organisation.com
username map = /etc/samba/smbusers

winbind separator = \
winbind enum users = yes
winbind enum groups = yes
winbind use default domain = yes

netbios name = sambalab-vm
workgroup = SAMBALAB
# realm = SAMBALAB
# password server = kerberos.organisation.com
# realm = kerberos.organisation.com
realm = ORGANISATION.INFO
server string = Samba %v on %L

os level = 65
preferred master = auto
domain master = yes
local master = yes
security = user
domain logons = yes
wins support = yes

add user script = /usr/sbin/smbldap-useradd -m '%u'
delete user script = /usr/sbin/smbldap-userdel '%u'
add group script = /usr/sbin/smbldap-groupadd -p '%g'
delete group script = /usr/sbin/smbldap-groupdel '%g'
add user to group script = /usr/sbin/smbldap-groupmod -m '%g' '%u'
delete user from group script = /usr/sbin/smbldap-groupmod -x '%g' '%u'
set primary group script = /usr/sbin/smbldap-usermod -g '%g' '%u'
# add machine script = /usr/sbin/smbldap-useradd -i -w "%u"
add machine script = /usr/sbin/smbldap-useradd -w "%u"

ldap suffix = dc=organisation,dc=info
ldap machine suffix = ou=People
ldap user suffix = ou=People
# ldap group suffix = ou=Groups
ldap group suffix = ou=Group
ldap idmap suffix = ou=Idmap
ldap admin dn = uid=sambaadmin,ou=samba,ou=apps,dc=organisation,dc=info
# idmap backend = ldap://ldapsandbox.organisation.com
idmap uid = 10000-20000
idmap gid = 10000-20000

logon path = \\%N\profiles\%U
logon drive = H:
logon home = \\homeserver\%U\winprofile
logon script = logon.cmd

[netlogon]
path = /var/lib/samba/netlogon
read only = yes

[profiles]
path = /var/lib/samba/profiles
read only = no
create mask = 0600
directory mask = 0700

[IPC$]
path = /tmp


