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