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