9bc910
# This is the main Samba configuration file. For detailed information about the
9bc910
# options listed here, refer to the smb.conf(5) manual page. Samba has a huge
9bc910
# number of configurable options, most of which are not shown in this example.
9bc910
#
9bc910
# The Official Samba 3.2.x HOWTO and Reference Guide contains step-by-step
9bc910
# guides for installing, configuring, and using Samba:
9bc910
# http://www.samba.org/samba/docs/Samba-HOWTO-Collection.pdf
9bc910
#
9bc910
# The Samba-3 by Example guide has working examples for smb.conf. This guide is
9bc910
# generated daily: http://www.samba.org/samba/docs/Samba-Guide.pdf
9bc910
#
9bc910
# In this file, lines starting with a semicolon (;) or a hash (#) are
9bc910
# comments and are ignored. This file uses hashes to denote commentary and
9bc910
# semicolons for parts of the file you may wish to configure.
9bc910
#
9bc910
# Note: Run the "testparm" command after modifying this file to check for basic
9bc910
# syntax errors.
9bc910
#
9bc910
#---------------
9bc910
# Security-Enhanced Linux (SELinux) Notes:
9bc910
#
9bc910
# Turn the samba_domain_controller Boolean on to allow Samba to use the useradd
9bc910
# and groupadd family of binaries. Run the following command as the root user to
9bc910
# turn this Boolean on:
9bc910
# setsebool -P samba_domain_controller on
9bc910
#
9bc910
# Turn the samba_enable_home_dirs Boolean on if you want to share home
9bc910
# directories via Samba. Run the following command as the root user to turn this
9bc910
# Boolean on:
9bc910
# setsebool -P samba_enable_home_dirs on
9bc910
#
9bc910
# If you create a new directory, such as a new top-level directory, label it
9bc910
# with samba_share_t so that SELinux allows Samba to read and write to it. Do
9bc910
# not label system directories, such as /etc/ and /home/, with samba_share_t, as
9bc910
# such directories should already have an SELinux label.
9bc910
#
9bc910
# Run the "ls -ldZ /path/to/directory" command to view the current SELinux
9bc910
# label for a given directory.
9bc910
#
9bc910
# Set SELinux labels only on files and directories you have created. Use the
9bc910
# chcon command to temporarily change a label:
9bc910
# chcon -t samba_share_t /path/to/directory
9bc910
#
9bc910
# Changes made via chcon are lost when the file system is relabeled or commands
9bc910
# such as restorecon are run.
9bc910
#
9bc910
# Use the samba_export_all_ro or samba_export_all_rw Boolean to share system
9bc910
# directories. To share such directories and only allow read-only permissions:
9bc910
# setsebool -P samba_export_all_ro on
9bc910
# To share such directories and allow read and write permissions:
9bc910
# setsebool -P samba_export_all_rw on
9bc910
#
9bc910
# To run scripts (preexec/root prexec/print command/...), copy them to the
9bc910
# /var/lib/samba/scripts/ directory so that SELinux will allow smbd to run them.
9bc910
# Note that if you move the scripts to /var/lib/samba/scripts/, they retain
9bc910
# their existing SELinux labels, which may be labels that SELinux does not allow
9bc910
# smbd to run. Copying the scripts will result in the correct SELinux labels.
9bc910
# Run the "restorecon -R -v /var/lib/samba/scripts" command as the root user to
9bc910
# apply the correct SELinux labels to these files.
9bc910
#
9bc910
#--------------
9bc910
#
9bc910
#======================= Global Settings =====================================
9bc910
9bc910
[global]
9bc910
9bc910
# ----------------------- Network-Related Options -------------------------
9bc910
#
9bc910
# workgroup = the Windows NT domain name or workgroup name, for example, MYGROUP.
9bc910
#
9bc910
# server string = the equivalent of the Windows NT Description field.
9bc910
#
9bc910
# netbios name = used to specify a server name that is not tied to the hostname.
9bc910
#
9bc910
# interfaces = used to configure Samba to listen on multiple network interfaces.
9bc910
# If you have multiple interfaces, you can use the "interfaces =" option to
9bc910
# configure which of those interfaces Samba listens on. Never omit the localhost
9bc910
# interface (lo).
9bc910
#
9bc910
# hosts allow = the hosts allowed to connect. This option can also be used on a
9bc910
# per-share basis.
9bc910
#
9bc910
# hosts deny = the hosts not allowed to connect. This option can also be used on
9bc910
# a per-share basis.
9bc910
#
9bc910
# max protocol = used to define the supported protocol. The default is NT1. You
9bc910
# can set it to SMB2 if you want experimental SMB2 support.
9bc910
#
9bc910
	workgroup = MYGROUP
9bc910
	server string = Samba Server Version %v
9bc910
9bc910
;	netbios name = MYSERVER
9bc910
9bc910
;	interfaces = lo eth0 192.168.12.2/24 192.168.13.2/24
9bc910
;	hosts allow = 127. 192.168.12. 192.168.13.
9bc910
9bc910
;	max protocol = SMB2
9bc910
9bc910
# --------------------------- Logging Options -----------------------------
9bc910
#
9bc910
# log file = specify where log files are written to and how they are split.
9bc910
#
9bc910
# max log size = specify the maximum size log files are allowed to reach. Log
9bc910
# files are rotated when they reach the size specified with "max log size".
9bc910
#
9bc910
9bc910
	# log files split per-machine:
9bc910
	log file = /var/log/samba/log.%m
9bc910
	# maximum size of 50KB per log file, then rotate:
9bc910
	max log size = 50
9bc910
9bc910
# ----------------------- Standalone Server Options ------------------------
9bc910
#
9bc910
# security = the mode Samba runs in. This can be set to user, share
9bc910
# (deprecated), or server (deprecated).
9bc910
#
9bc910
# passdb backend = the backend used to store user information in. New
9bc910
# installations should use either tdbsam or ldapsam. No additional configuration
9bc910
# is required for tdbsam. The "smbpasswd" utility is available for backwards
9bc910
# compatibility.
9bc910
#
9bc910
9bc910
	security = user
9bc910
	passdb backend = tdbsam
9bc910
9bc910
9bc910
# ----------------------- Domain Members Options ------------------------
9bc910
#
9bc910
# security = must be set to domain or ads.
9bc910
#
9bc910
# passdb backend = the backend used to store user information in. New
9bc910
# installations should use either tdbsam or ldapsam. No additional configuration
9bc910
# is required for tdbsam. The "smbpasswd" utility is available for backwards
9bc910
# compatibility.
9bc910
#
9bc910
# realm = only use the realm option when the "security = ads" option is set.
9bc910
# The realm option specifies the Active Directory realm the host is a part of.
9bc910
#
9bc910
# password server = only use this option when the "security = server"
9bc910
# option is set, or if you cannot use DNS to locate a Domain Controller. The
9bc910
# argument list can include My_PDC_Name, [My_BDC_Name], and [My_Next_BDC_Name]:
9bc910
#
9bc910
# password server = My_PDC_Name [My_BDC_Name] [My_Next_BDC_Name]
9bc910
#
9bc910
# Use "password server = *" to automatically locate Domain Controllers.
9bc910
9bc910
;	security = domain
9bc910
;	passdb backend = tdbsam
9bc910
;	realm = MY_REALM
9bc910
9bc910
;	password server = <NT-Server-Name>
9bc910
9bc910
# ----------------------- Domain Controller Options ------------------------
9bc910
#
9bc910
# security = must be set to user for domain controllers.
9bc910
#
9bc910
# passdb backend = the backend used to store user information in. New
9bc910
# installations should use either tdbsam or ldapsam. No additional configuration
9bc910
# is required for tdbsam. The "smbpasswd" utility is available for backwards
9bc910
# compatibility.
9bc910
#
9bc910
# domain master = specifies Samba to be the Domain Master Browser, allowing
9bc910
# Samba to collate browse lists between subnets. Do not use the "domain master"
9bc910
# option if you already have a Windows NT domain controller performing this task.
9bc910
#
9bc910
# domain logons = allows Samba to provide a network logon service for Windows
9bc910
# workstations.
9bc910
#
9bc910
# logon script = specifies a script to run at login time on the client. These
9bc910
# scripts must be provided in a share named NETLOGON.
9bc910
#
9bc910
# logon path = specifies (with a UNC path) where user profiles are stored.
9bc910
#
9bc910
#
9bc910
;	security = user
9bc910
;	passdb backend = tdbsam
9bc910
9bc910
;	domain master = yes
9bc910
;	domain logons = yes
9bc910
9bc910
	# the following login script name is determined by the machine name
9bc910
	# (%m):
9bc910
;	logon script = %m.bat
9bc910
	# the following login script name is determined by the UNIX user used:
9bc910
;	logon script = %u.bat
9bc910
;	logon path = \\%L\Profiles\%u
9bc910
	# use an empty path to disable profile support:
9bc910
;	logon path =
9bc910
9bc910
	# various scripts can be used on a domain controller or a stand-alone
9bc910
	# machine to add or delete corresponding UNIX accounts:
9bc910
9bc910
;	add user script = /usr/sbin/useradd "%u" -n -g users
9bc910
;	add group script = /usr/sbin/groupadd "%g"
9bc910
;	add machine script = /usr/sbin/useradd -n -c "Workstation (%u)" -M -d /nohome -s /bin/false "%u"
9bc910
;	delete user script = /usr/sbin/userdel "%u"
9bc910
;	delete user from group script = /usr/sbin/userdel "%u" "%g"
9bc910
;	delete group script = /usr/sbin/groupdel "%g"
9bc910
9bc910
9bc910
# ----------------------- Browser Control Options ----------------------------
9bc910
#
9bc910
# local master = when set to no, Samba does not become the master browser on
9bc910
# your network. When set to yes, normal election rules apply.
9bc910
#
9bc910
# os level = determines the precedence the server has in master browser
9bc910
# elections. The default value should be reasonable.
9bc910
#
9bc910
# preferred master = when set to yes, Samba forces a local browser election at
9bc910
# start up (and gives itself a slightly higher chance of winning the election).
9bc910
#
9bc910
;	local master = no
9bc910
;	os level = 33
9bc910
;	preferred master = yes
9bc910
9bc910
#----------------------------- Name Resolution -------------------------------
9bc910
#
9bc910
# This section details the support for the Windows Internet Name Service (WINS).
9bc910
#
9bc910
# Note: Samba can be either a WINS server or a WINS client, but not both.
9bc910
#
9bc910
# wins support = when set to yes, the NMBD component of Samba enables its WINS
9bc910
# server.
9bc910
#
9bc910
# wins server = tells the NMBD component of Samba to be a WINS client.
9bc910
#
9bc910
# wins proxy = when set to yes, Samba answers name resolution queries on behalf
9bc910
# of a non WINS capable client. For this to work, there must be at least one
9bc910
# WINS server on the network. The default is no.
9bc910
#
9bc910
# dns proxy = when set to yes, Samba attempts to resolve NetBIOS names via DNS
9bc910
# nslookups.
9bc910
9bc910
;	wins support = yes
9bc910
;	wins server = w.x.y.z
9bc910
;	wins proxy = yes
9bc910
9bc910
;	dns proxy = yes
9bc910
9bc910
# --------------------------- Printing Options -----------------------------
9bc910
#
9bc910
# The options in this section allow you to configure a non-default printing
9bc910
# system.
9bc910
#
9bc910
# load printers = when set you yes, the list of printers is automatically
9bc910
# loaded, rather than setting them up individually.
9bc910
#
9bc910
# cups options = allows you to pass options to the CUPS library. Setting this
9bc910
# option to raw, for example, allows you to use drivers on your Windows clients.
9bc910
#
9bc910
# printcap name = used to specify an alternative printcap file.
9bc910
#
9bc910
9bc910
	load printers = yes
9bc910
	cups options = raw
9bc910
9bc910
;	printcap name = /etc/printcap
9bc910
	# obtain a list of printers automatically on UNIX System V systems:
9bc910
;	printcap name = lpstat
9bc910
;	printing = cups
9bc910
9bc910
# --------------------------- File System Options ---------------------------
9bc910
#
9bc910
# The options in this section can be un-commented if the file system supports
9bc910
# extended attributes, and those attributes are enabled (usually via the
9bc910
# "user_xattr" mount option). These options allow the administrator to specify
9bc910
# that DOS attributes are stored in extended attributes and also make sure that
9bc910
# Samba does not change the permission bits.
9bc910
#
9bc910
# Note: These options can be used on a per-share basis. Setting them globally
9bc910
# (in the [global] section) makes them the default for all shares.
9bc910
9bc910
;	map archive = no
9bc910
;	map hidden = no
9bc910
;	map read only = no
9bc910
;	map system = no
9bc910
;	store dos attributes = yes
9bc910
9bc910
9bc910
#============================ Share Definitions ==============================
9bc910
9bc910
[homes]
9bc910
	comment = Home Directories
9bc910
	browseable = no
9bc910
	writable = yes
9bc910
;	valid users = %S
9bc910
;	valid users = MYDOMAIN\%S
9bc910
9bc910
[printers]
9bc910
	comment = All Printers
9bc910
	path = /var/spool/samba
9bc910
	browseable = no
9bc910
	guest ok = no
9bc910
	writable = no
9bc910
	printable = yes
9bc910
9bc910
# Un-comment the following and create the netlogon directory for Domain Logons:
9bc910
;	[netlogon]
9bc910
;	comment = Network Logon Service
9bc910
;	path = /var/lib/samba/netlogon
9bc910
;	guest ok = yes
9bc910
;	writable = no
9bc910
;	share modes = no
9bc910
9bc910
# Un-comment the following to provide a specific roving profile share.
9bc910
# The default is to use the user's home directory:
9bc910
;	[Profiles]
9bc910
;	path = /var/lib/samba/profiles
9bc910
;	browseable = no
9bc910
;	guest ok = yes
9bc910
9bc910
# A publicly accessible directory that is read only, except for users in the
9bc910
# "staff" group (which have write permissions):
9bc910
;	[public]
9bc910
;	comment = Public Stuff
9bc910
;	path = /home/samba
9bc910
;	public = yes
9bc910
;	writable = yes
9bc910
;	printable = no
9bc910
;	write list = +staff