# This file is the example: smb-roaming-profiles-en.conf
#  
# Skolelinux configuration file for the samba suite
#
# Please read the smb.conf(5) manual page 
#
# NOTE: Whenever you modify this file you should run the command
# "testparm" to check that you have not many any basic syntactic 
# errors. 
#

# Modified for use with skolelinux by Svein Magne Bang 2003/04/02

# -----------------------------------------------------------------------------
# Modified for use in a mainserver only profile
# according along my suggestions at
# "http://bugs.skolelinux.org/show_bug.cgi?id=1064" 
# Please go there and read all comments to recognize
# what is the concept behind this smb.conf file.
# This example is according to the sugestions made for using 'roaming profiles'
# which you can be read here:
# 'http://www.samba.org/samba/docs/man/Samba-HOWTO-Collection/ProfileMgmt.html'
# and here 'http://www.samba.org/samba/docs/using_samba/ch04.html'
# More information can be found in the manuals.
# -- Jürgen Leibner -- [07/17/2009]
# -- Jürgen Leibner -- [10/27/2010]
# -----------------------------------------------------------------------------

#======================= Global Settings =======================

[global]

# Do something sensible when Samba crashes: mail the admin a backtrace
;   panic action = /usr/share/samba/panic-action %d

# server name
   netbios name = tjener

# server string/NT Description field
   server string = %h server (Samba %v)

# Workgroup/NT-domain name

   workgroup = skolelinux
   # make sure to serve only the right network 
   interfaces = 10.0.2.2/23 127.0.0.1/8
   bind interfaces only = yes


# OpenLDAP configuration 

   passdb backend = ldapsam:ldap://ldap
   ldap suffix = dc=skole,dc=skolelinux,dc=no
   ldap user suffix = ou=people
   ldap group suffix = ou=group
   ldap machine suffix = ou=machines,ou=people
   ldap admin dn = "cn=smbadmin,ou=samba,dc=skole,dc=skolelinux,dc=no"
   ldap ssl = start_tls

# PAM setup   
   # need to be 'no' to get kerberos working!
   obey pam restrictions = no
   
# Printer settings

   load printers = yes
   printing = cups
   printcap name = cups

# Network logon

   # Where to find the client profiles share
   # Used for NT and above (Win2k/WinXP/...) clients
   logon path = \\tjener\profiles\%a\%U

   # Used for Win95/98/me clients
   logon home = \\tjener\%U\.profiles
   
   # Which drive letter to use for the homes share
   logon drive = H:

   # The logon script to run.
   logon script = scripts\login.bat
  
   # You have to create the 'scripts' directory in your netlogon directory 
   # and move the standard content to it.
   # Then you can have a 'Default User' directory to autoconfigure 
   # a fresh users profile at first logon time in the domain.
   # Please read the samba docs for more information about that feature.

;   invalid users = root

# Logfiles

   log file = /var/log/samba/%m.log
   max log size = 1000
   syslog = 0

# Security options

   security = ADS
   # should allways be set to 'true'
   encrypt passwords = true

# Use kerberos related settings

   realm = INTERN
   password server = kerberos
   client use spnego = yes
   kerberos method = dedicated keytab
   dedicated keytab file = /etc/krb5.keytab

# Networking options

   socket options = IPTOS_LOWDELAY TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192

# Browser Control Options

  local master = yes
  domain logons = yes
  domain master = yes
  preferred master = yes

  os level = 65

# WINS Support

   wins support = yes

# DNS proxy for NetBIOS

   dns proxy = no

# Add NT clients

   add machine script = /etc/samba/smbaddclient.pl %u

# File options
   hide files = /RECYCLER/?esktop.ini/ntuser.ini/NTUSER.*/.*/

# Disable changing of password using samba
  unix password sync = yes
  passwd program = /bin/false

#======================= Share Definitions =======================

[homes]
   comment = Home Directories
   browseable = no
   writable = yes
   create mask = 0664
   directory mask = 0775
   valid users = %S
   invalid users = root

[netlogon]
   comment = Network Logon Service
   path = /skole/tjener/samba/netlogon
   guest ok = yes
   browseable = no
   writable = yes
   share modes = no
   invalid users = root

# This is to divide the profile data from the user date in the homes-share.
[profiles]
   comment = User Profiles
   path = /skole/tjener/samba/profiles
   guest ok = no
   browseable = no
   writeable = yes
   create mask = 0700
   directory mask = 0700
   profile acls = Yes
   valid users = @admins, @jradmins, @teachers, @students

[printers]
   invalid users = root
   comment = All Printers
   browseable = no
   path = /tmp
   printable = yes
   public = no
   writable = no
   create mode = 0700

# You need to create the directories below by your own
# at a place with enough diskspace and don't forget to back it up.
# Also keep in mind to create an entry in the /etc/fstab file
# if you choose to put all the things on an own partition.

# Share for all the data a student might need
[data]
   comment = Data Share
   path = /skole/tjener/samba/data
   guest ok = no
   writable = yes
   create mask = 0770
   directory mask = 0770
   force user = winadmin
   force group = students
   write list = @admins, @jradmins, @teachers, @students
   valid users = @admins, @jradmins, @teachers, @students

# Share for the programs which are installed on the server
# and which keep there data in that place too,
# like the german program 'Lernwerkstatt[tm]' or similar software.
[programs]
   comment = Programs Share
   path = /skole/tjener/samba/programs
   guest ok = no
   writable = yes
   create mask = 0770
   directory mask = 0770
   force user = winadmin
   force group = students
   valid users = @admins, @jradmins, @teachers, @students

# Share for the admins windows[tm] software repository
[software]
   comment = Software Share
   path = /skole/tjener/samba/software
   browseable = yes
   guest ok = no
   writable = yes
   create mask = 0770
   directory mask = 0770
   force user = winadmin
   force group = admins
   valid users = @admins

# Share for the admins windows[tm] driver repository
[drivers]
   comment = Drivers Share
   path = /skole/tjener/samba/drivers
   browseable = yes
   guest ok = no
   writable = yes
   create mask = 0770
   directory mask = 0770
   force user = winadmin
   force group = admins
   valid users = @admins

#[shared]
#   invalid users = root
#   comment = Shared Folders
#   path = /skole/tjener/shared
#   guest ok = no
#   writable = yes
#   create mask = 0664
#   directory mask = 2775


