## Samba: smb.conf for PDC
##
## Template by: SATOH Fumiyasu @ OSS Technology Co.
##              <http://www.osstech.co.jp/>
## Date: 2007-04-12, since 2006-12-08

[global]
## ======================================================================

## Encoding
## ----------------------------------------------------------------------

dos charset = CP932
unix charset = UTF-8
display charset = UTF-8

## Identity
## ----------------------------------------------------------------------

workgroup = ##SAMBA_DOMAIN_NBNAME##
#netbios name = ##SAMBA_PDC_NBNAME##
server string = %L (Samba %v @ %h)

## Network
## ----------------------------------------------------------------------

interfaces =
bind interfaces only = yes
socket address =

#socket options = TCP_NODELAY IPTOS_LOWDELAY SO_RCVBUF=8576 SO_SNDBUF=8576
max xmit = 65535
deadtime = 10
keepalive = 300

## Logging
## ----------------------------------------------------------------------

log level = 1
## See *default_classname_table[] in lib/debug.c
#log level = 1 auth:3 winbind:3
log file = ##SAMBA_LOG_DIR##/%m.log
max log size = 1000

debug hires timestamp = no
debug pid = yes
debug uid = yes

syslog = 0
utmp = yes

#panic action = /usr/lib/samba/panicaction %d

## Security
## ----------------------------------------------------------------------

security = user
domain logons = yes

guest account = ##SAMBA_GUEST_NAME##
map to guest = bad user
#algorithmic rid base = 1000

winbind use default domain = yes
winbind enum users = yes
winbind enum groups = yes
winbind separator = +
winbind nested groups = no
#winbind refresh tickets = yes
## Samba 3.0.25 and later
#winbind normalize names = yes
winbind nss info = template
template homedir = /home/%D/%U
template shell = /bin/false

logon path =
logon home =
logon drive =
logon script =

## Password backend
## ----------------------------------------------------------------------

passdb backend = ldapsam:"ldap://127.0.0.1/ ##LDAP_SLAVE_URI##"

ldapsam:trusted = yes

ldap ssl = no
ldap admin dn = ##LDAP_ADMIN_DN##
ldap passwd sync = yes
ldap delete dn = no

ldap suffix = ##LDAP_DIT_SUFFIX##
ldap user suffix = ou=##LDAP_DIT_USER_OU##
ldap group suffix = ou=##LDAP_DIT_GROUP_OU##
ldap machine suffix = ou=##LDAP_DIT_MACHINE_OU##

add user script = /usr/sbin/smbldap-useradd -m '%u'
#rename user script = FIXME
delete user script = /usr/sbin/smbldap-userdel '%u'
set primary group script = /usr/sbin/smbldap-usermod -g '%g' '%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 '%u' '%g'
delete user from group script = /usr/sbin/smbldap-groupmod -x '%u' '%g'
add machine script = /usr/sbin/smbldap-useradd -w '%u'

add share command = ##SAMBA_SCRIPT_DIR##/smbshareadd
delete share command = ##SAMBA_SCRIPT_DIR##/smbsharedel
change share command = ##SAMBA_SCRIPT_DIR##/smbsharemod

## IDmap backend
## ----------------------------------------------------------------------

idmap backend = ldap:"ldap://127.0.0.1/ ##LDAP_SLAVE_URI##"
idmap uid = 10000-60000
idmap gid = 10000-60000

ldap idmap suffix = ou=##LDAP_DIT_IDMAP_OU##

## Browser
## ----------------------------------------------------------------------

os level = 64
preferred master = auto
domain master = auto
local master = yes

## Misc global configuration
## ----------------------------------------------------------------------

wins support = yes
time server = yes
host msdfs = no

load printers = no

## Default configuration for each file shares
## ======================================================================

msdfs root = no
mangling method = hash
delete veto files = yes

## Mac OS X via SMB
#hide files = /._*/.DS_Store/
## Mac OX 8/9/X via AppleTalk
#veto files = /.Apple*/.DS_Store/.TemporaryItems/.VolumeIcon.icns/.FBC*/Icon
/Network Trash Folder/Temporary Items/TheFindByContentFolder/TheVolumeSettingsFolder/

## Default configuration for each printer shares
## ======================================================================

printing = cups
cups options = raw

#show add printer wizard = no
#default devmode= yes
#use client driver = yes

## Default configuration for each file/printer shares
## ======================================================================

path = /nonexistent
admin users = ##SAMBA_ADMIN_NAME##
printer admin = ##SAMBA_ADMIN_NAME##

inherit permissions = yes
inherit acls = yes
map acl inherit = yes
store dos attributes = yes
ea support = yes
map system = no
map hidden = no
map archive = no

force directory mode = 02000
directory mask = 0775
create mask = 0664
dos filemode = yes
dos filetimes = yes
dos filetime resolution = yes
fake directory create times = yes

#vfs objects = full_audit
#full_audit:failure = connect disconnect opendir mkdir rmdir open rename unlink
#full_audit:success = connect disconnect mkdir rmdir open close rename unlink

[NETLOGON]
## ======================================================================
## Logon script

available = no

path = /var/lib/samba/netlogon
comment = ログオンスクリプト
browseable = no
guest ok = yes
write list = ##SAMBA_ADMIN_NAME##

[PROFILES]
## ======================================================================
## Roaming profile

available = no

path = /var/lib/samba/profiles
comment = ユーザープロファイル
browseable = no
writeable = yes
create mask = 0601
directory mask = 0700
profile acls = yes
map hidden = yes

[PRINT$]
## ======================================================================
## Priner driver

available = no

path = /var/lib/samba/printers
comment = プリンタドライバ
guest ok = yes
write list = ##SAMBA_ADMIN_NAME##
root preexec = /bin/sh -c 'umask 022 && mkdir -p "%P/W32X86" "%P/WIN40" "%P/x64" "%P/IA64"'
root preexec close = yes

[C$]
## ======================================================================
## Shared storage

available = no

path = /share
comment = 共有領域ルートフォルダ
valid users = ##SAMBA_ADMIN_NAME##
writeable = yes
veto files = /lost+found/

[homes]
## ======================================================================
## User's home folders

available = no

#path = %H/share
## FIXME: Variable substitutions do NOT work correctly on [homes]'s comment.
#comment = %S ホームフォルダ
browseable = no
#valid users = %S
invalid users = ##SAMBA_ADMIN_NAME##
guest ok = no
writeable = yes

