walters / rpms / samba

Forked from rpms/samba 5 years ago
Clone
ssorce 85e8b73
# This is the main Samba configuration file. You should read the
ssorce 85e8b73
# smb.conf(5) manual page in order to understand the options listed
ssorce 85e8b73
# here. Samba has a huge number of configurable options (perhaps too
ssorce 85e8b73
# many!) most of which are not shown in this example
ssorce 85e8b73
#
ssorce 85e8b73
# For a step to step guide on installing, configuring and using samba, 
ssorce 85e8b73
# read the Samba-HOWTO-Collection. This may be obtained from:
ssorce 85e8b73
#  http://www.samba.org/samba/docs/Samba-HOWTO-Collection.pdf
ssorce 85e8b73
#
ssorce 85e8b73
# Many working examples of smb.conf files can be found in the 
ssorce 85e8b73
# Samba-Guide which is generated daily and can be downloaded from: 
ssorce 85e8b73
#  http://www.samba.org/samba/docs/Samba-Guide.pdf
ssorce 85e8b73
#
ssorce 85e8b73
# Any line which starts with a ; (semi-colon) or a # (hash) 
ssorce 85e8b73
# is a comment and is ignored. In this example we will use a #
ssorce 85e8b73
# for commentry and a ; for parts of the config file that you
ssorce 85e8b73
# may wish to enable
ssorce 85e8b73
#
ssorce 85e8b73
# NOTE: Whenever you modify this file you should run the command "testparm"
ssorce 85e8b73
# to check that you have not made any basic syntactic errors. 
ssorce 85e8b73
#
ssorce 8bc3db5
#---------------
ssorce 8bc3db5
# SELINUX NOTES:
ssorce 8bc3db5
#
ssorce 8bc3db5
# If you want to use the useradd/groupadd family of binaries please run:
ssorce 8bc3db5
# setsebool -P samba_domain_controller on
ssorce 8bc3db5
#
ssorce 8bc3db5
# If you want to share home directories via samba please run:
ssorce 8bc3db5
# setsebool -P samba_enable_home_dirs on
ssorce 8bc3db5
#
ssorce 8bc3db5
# If you create a new directory you want to share you should mark it as
ssorce 8bc3db5
# "samba-share_t" so that selinux will let you write into it.
ssorce 8bc3db5
# Make sure not to do that on system directories as they may already have
ssorce 8bc3db5
# been marked with othe SELinux labels.
ssorce 8bc3db5
#
ssorce 8bc3db5
# Use ls -ldZ /path to see which context a directory has
ssorce 8bc3db5
#
ssorce 8bc3db5
# Set labels only on directories you created!
ssorce 8bc3db5
# To set a label use the following: chcon -t samba_share_t /path
ssorce 8bc3db5
#
ssorce 8bc3db5
# If you need to share a system created directory you can use one of the
ssorce 8bc3db5
# following (read-only/read-write):
ssorce 8bc3db5
# setsebool -P samba_export_all_ro on
ssorce 8bc3db5
# or
ssorce 8bc3db5
# setsebool -P samba_export_all_rw on
ssorce 8bc3db5
#
ssorce 8bc3db5
# If you want to run scripts (preexec/root prexec/print command/...) please
ssorce 8bc3db5
# put them into the /var/lib/samba/scripts directory so that smbd will be
ssorce 8bc3db5
# allowed to run them.
ssorce 8bc3db5
# Make sure you COPY them and not MOVE them so that the right SELinux context
ssorce 8bc3db5
# is applied, to check all is ok use restorecon -R -v /var/lib/samba/scripts
ssorce 8bc3db5
#
ssorce 8bc3db5
#--------------
ssorce 8bc3db5
#
ssorce 85e8b73
#======================= Global Settings =====================================
ssorce 85e8b73
	
ssorce 85e8b73
[global]
ssorce 85e8b73
	
ssorce 85e8b73
# ----------------------- Netwrok Related Options -------------------------
ssorce 85e8b73
#
ssorce 85e8b73
# workgroup = NT-Domain-Name or Workgroup-Name, eg: MIDEARTH
ssorce 85e8b73
#
ssorce 85e8b73
# server string is the equivalent of the NT Description field
ssorce 85e8b73
#
ssorce 85e8b73
# netbios name can be used to specify a server name not tied to the hostname
ssorce 85e8b73
#
ssorce 85e8b73
# Interfaces lets you configure Samba to use multiple interfaces
ssorce 85e8b73
# If you have multiple network interfaces then you can list the ones
ssorce 85e8b73
# you want to listen on (never omit localhost)
ssorce 85e8b73
#
ssorce 85e8b73
# Hosts Allow/Hosts Deny lets you restrict who can connect, and you can
ssorce 85e8b73
# specifiy it as a per share option as well
ssorce 85e8b73
#
ssorce 85e8b73
	workgroup = MYGROUP
ssorce 85e8b73
	server string = Samba Server Version %v
ssorce 85e8b73
	
ssorce 85e8b73
;	netbios name = MYSERVER
ssorce 85e8b73
	
ssorce 85e8b73
;	interfaces = lo eth0 192.168.12.2/24 192.168.13.2/24 
ssorce 85e8b73
;	hosts allow = 127. 192.168.12. 192.168.13.
ssorce 85e8b73
	
ssorce 85e8b73
# --------------------------- Logging Options -----------------------------
ssorce 85e8b73
#
ssorce 85e8b73
# Log File let you specify where to put logs and how to split them up.
ssorce 85e8b73
#
ssorce 85e8b73
# Max Log Size let you specify the max size log files should reach
ssorce 85e8b73
	
ssorce 042f6f3
	# logs split per machine
ssorce 042f6f3
	log file = /var/log/samba/log.%m
ssorce 042f6f3
	# max 50KB per log file, then rotate
ssorce 042f6f3
	max log size = 50
ssorce 85e8b73
	
ssorce 85e8b73
# ----------------------- Standalone Server Options ------------------------
ssorce 85e8b73
#
ssorce 85e8b73
# Scurity can be set to user, share(deprecated) or server(deprecated)
ssorce 85e8b73
#
ssorce 85e8b73
# Backend to store user information in. New installations should 
ssorce 85e8b73
# use either tdbsam or ldapsam. smbpasswd is available for backwards 
ssorce 85e8b73
# compatibility. tdbsam requires no further configuration.
ssorce ad47062
ssorce ad47062
	security = user
ssorce ad47062
	passdb backend = tdbsam
ssorce ad47062
ssorce ad47062
ssorce 85e8b73
# ----------------------- Domain Members Options ------------------------
ssorce 85e8b73
#
ssorce 85e8b73
# Security must be set to domain or ads
ssorce 85e8b73
#
ssorce 85e8b73
# Use the realm option only with security = ads
ssorce 85e8b73
# Specifies the Active Directory realm the host is part of
ssorce 6c21016
#
ssorce 6c21016
# Backend to store user information in. New installations should 
ssorce 6c21016
# use either tdbsam or ldapsam. smbpasswd is available for backwards 
ssorce 6c21016
# compatibility. tdbsam requires no further configuration.
ssorce ad47062
#
ssorce ad47062
# Use password server option only with security = server or if you can't
ssorce ad47062
# use the DNS to locate Domain Controllers
ssorce ad47062
# The argument list may include:
ssorce ad47062
#   password server = My_PDC_Name [My_BDC_Name] [My_Next_BDC_Name]
ssorce ad47062
# or to auto-locate the domain controller/s
ssorce ad47062
#   password server = *
ssorce ad47062
	
ssorce 85e8b73
	
ssorce 85e8b73
;	security = domain
ssorce 6c21016
;	passdb backend = tdbsam
ssorce 85e8b73
;	realm = MY_REALM
ssorce ad47062
ssorce ad47062
;	password server = <NT-Server-Name>
ssorce ad47062
ssorce 85e8b73
# ----------------------- Domain Controller Options ------------------------
ssorce 85e8b73
#
ssorce 85e8b73
# Security must be set to user for domain controllers
ssorce 85e8b73
#
ssorce 6c21016
# Backend to store user information in. New installations should 
ssorce 6c21016
# use either tdbsam or ldapsam. smbpasswd is available for backwards 
ssorce 6c21016
# compatibility. tdbsam requires no further configuration.
ssorce 6c21016
#
ssorce 85e8b73
# Domain Master specifies Samba to be the Domain Master Browser. This
ssorce 85e8b73
# allows Samba to collate browse lists between subnets. Don't use this
ssorce 85e8b73
# if you already have a Windows NT domain controller doing this job
ssorce 85e8b73
#
ssorce 85e8b73
# Domain Logons let Samba be a domain logon server for Windows workstations. 
ssorce 85e8b73
#
ssorce 85e8b73
# Logon Scrpit let yuou specify a script to be run at login time on the client
ssorce 85e8b73
# You need to provide it in a share called NETLOGON
ssorce 85e8b73
#
ssorce 85e8b73
# Logon Path let you specify where user profiles are stored (UNC path)
ssorce 85e8b73
#
ssorce 85e8b73
# Various scripts can be used on a domain controller or stand-alone
ssorce 85e8b73
# machine to add or delete corresponding unix accounts
ssorce 85e8b73
#
ssorce 85e8b73
;	security = user
ssorce 6c21016
;	passdb backend = tdbsam
ssorce 85e8b73
	
ssorce 85e8b73
;	domain master = yes 
ssorce 85e8b73
;	domain logons = yes
ssorce 85e8b73
	
ssorce 042f6f3
	# the login script name depends on the machine name
ssorce 042f6f3
;	logon script = %m.bat
ssorce 042f6f3
	# the login script name depends on the unix user used
ssorce 042f6f3
;	logon script = %u.bat
ssorce 85e8b73
;	logon path = \\%L\Profiles\%u
ssorce 042f6f3
	# disables profiles support by specifing an empty path
ssorce 042f6f3
;	logon path =          
ssorce 85e8b73
	
ssorce beb3d94
;	add user script = /usr/sbin/useradd "%u" -n -g users
ssorce beb3d94
;	add group script = /usr/sbin/groupadd "%g"
ssorce 8bc3db5
;	add machine script = /usr/sbin/useradd -n -c "Workstation (%u)" -M -d /nohome -s /bin/false "%u"
ssorce beb3d94
;	delete user script = /usr/sbin/userdel "%u"
ssorce 8bc3db5
;	delete user from group script = /usr/sbin/userdel "%u" "%g"
ssorce beb3d94
;	delete group script = /usr/sbin/groupdel "%g"
ssorce 85e8b73
	
ssorce 85e8b73
	
ssorce 85e8b73
# ----------------------- Browser Control Options ----------------------------
ssorce 85e8b73
#
ssorce 85e8b73
# set local master to no if you don't want Samba to become a master
ssorce 85e8b73
# browser on your network. Otherwise the normal election rules apply
ssorce 85e8b73
#
ssorce 85e8b73
# OS Level determines the precedence of this server in master browser
ssorce 85e8b73
# elections. The default value should be reasonable
ssorce 85e8b73
#
ssorce 85e8b73
# Preferred Master causes Samba to force a local browser election on startup
ssorce 85e8b73
# and gives it a slightly higher chance of winning the election
ssorce 85e8b73
;	local master = no
ssorce 85e8b73
;	os level = 33
ssorce 85e8b73
;	preferred master = yes
ssorce 85e8b73
	
ssorce 85e8b73
#----------------------------- Name Resolution -------------------------------
ssorce 85e8b73
# Windows Internet Name Serving Support Section:
ssorce 85e8b73
# Note: Samba can be either a WINS Server, or a WINS Client, but NOT both
ssorce 85e8b73
#
ssorce 85e8b73
# - WINS Support: Tells the NMBD component of Samba to enable it's WINS Server
ssorce 85e8b73
#
ssorce 85e8b73
# - WINS Server: Tells the NMBD components of Samba to be a WINS Client
ssorce 85e8b73
#
ssorce 85e8b73
# - WINS Proxy: Tells Samba to answer name resolution queries on
ssorce 85e8b73
#   behalf of a non WINS capable client, for this to work there must be
ssorce 85e8b73
#   at least one	WINS Server on the network. The default is NO.
ssorce 85e8b73
#
ssorce 85e8b73
# DNS Proxy - tells Samba whether or not to try to resolve NetBIOS names
ssorce 1cf5eb5
# via DNS nslookups.
ssorce 85e8b73
	
ssorce 85e8b73
;	wins support = yes
ssorce 85e8b73
;	wins server = w.x.y.z
ssorce 85e8b73
;	wins proxy = yes
ssorce 85e8b73
	
ssorce 1cf5eb5
;	dns proxy = yes
ssorce 85e8b73
	
ssorce 85e8b73
# --------------------------- Printing Options -----------------------------
ssorce 85e8b73
#
ssorce 85e8b73
# Load Printers let you load automatically the list of printers rather
ssorce 85e8b73
# than setting them up individually
ssorce 85e8b73
#
ssorce 1cf5eb5
# Cups Options let you pass the cups libs custom options, setting it to raw
ssorce 1cf5eb5
# for example will let you use drivers on your Windows clients
ssorce 1cf5eb5
#
ssorce 85e8b73
# Printcap Name let you specify an alternative printcap file
ssorce 85e8b73
#
ssorce 85e8b73
# You can choose a non default printing system using the Printing option
ssorce 85e8b73
	
ssorce 85e8b73
	load printers = yes
ssorce 1cf5eb5
	cups options = raw
ssorce 1cf5eb5
ssorce 85e8b73
;	printcap name = /etc/printcap
ssorce 042f6f3
	#obtain list of printers automatically on SystemV
ssorce 042f6f3
;	printcap name = lpstat
ssorce 85e8b73
;	printing = cups
ssorce 3a4d235
ssorce 3a4d235
# --------------------------- Filesystem Options ---------------------------
ssorce 3a4d235
#
ssorce 3a4d235
# The following options can be uncommented if the filesystem supports
ssorce 3a4d235
# Extended Attributes and they are enabled (usually by the mount option
ssorce 3a4d235
# user_xattr). Thess options will let the admin store the DOS attributes
ssorce 3a4d235
# in an EA and make samba not mess with the permission bits.
ssorce 3a4d235
#
ssorce 3a4d235
# Note: these options can also be set just per share, setting them in global
ssorce 3a4d235
# makes them the default for all shares
ssorce 3a4d235
ssorce 3a4d235
;	map archive = no
ssorce 3a4d235
;	map hidden = no
ssorce 3a4d235
;	map read only = no
ssorce 3a4d235
;	map system = no
ssorce 3a4d235
;	store dos attributes = yes
ssorce 3a4d235
ssorce 3a4d235
ssorce 85e8b73
#============================ Share Definitions ==============================
ssorce 85e8b73
	
ssorce 85e8b73
[homes]
ssorce 85e8b73
	comment = Home Directories
ssorce 85e8b73
	browseable = no
ssorce 85e8b73
	writable = yes
ssorce 85e8b73
;	valid users = %S
ssorce 85e8b73
;	valid users = MYDOMAIN\%S
ssorce 85e8b73
	
ssorce 85e8b73
[printers]
ssorce 85e8b73
	comment = All Printers
ssorce 85e8b73
	path = /var/spool/samba
ssorce 85e8b73
	browseable = no
ssorce 85e8b73
	guest ok = no
ssorce 85e8b73
	writable = no
ssorce 85e8b73
	printable = yes
ssorce 85e8b73
	
ssorce 85e8b73
# Un-comment the following and create the netlogon directory for Domain Logons
ssorce 85e8b73
;	[netlogon]
ssorce 85e8b73
;	comment = Network Logon Service
ssorce 85e8b73
;	path = /var/lib/samba/netlogon
ssorce 85e8b73
;	guest ok = yes
ssorce 85e8b73
;	writable = no
ssorce 85e8b73
;	share modes = no
ssorce 85e8b73
	
ssorce 85e8b73
	
ssorce 85e8b73
# Un-comment the following to provide a specific roving profile share
ssorce 85e8b73
# the default is to use the user's home directory
ssorce 85e8b73
;	[Profiles]
ssorce 85e8b73
;	path = /var/lib/samba/profiles
ssorce 85e8b73
;	browseable = no
ssorce 85e8b73
;	guest ok = yes
ssorce 85e8b73
	
ssorce 85e8b73
	
ssorce 85e8b73
# A publicly accessible directory, but read only, except for people in
ssorce 85e8b73
# the "staff" group
ssorce 85e8b73
;	[public]
ssorce 85e8b73
;	comment = Public Stuff
ssorce 85e8b73
;	path = /home/samba
ssorce 85e8b73
;	public = yes
ssorce 85e8b73
;	writable = yes
ssorce 85e8b73
;	printable = no
ssorce 85e8b73
;	write list = +staff