Subversion Repositories configs

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
192 - 1
# This is the main Samba configuration file. For detailed information about the
2
# options listed here, refer to the smb.conf(5) manual page. Samba has a huge
3
# number of configurable options, most of which are not shown in this example.
4
#
5
# The Samba Wiki contains a lot of step-by-step guides installing, configuring,
6
# and using Samba:
7
# https://wiki.samba.org/index.php/User_Documentation
8
#
9
# In this file, lines starting with a semicolon (;) or a hash (#) are
10
# comments and are ignored. This file uses hashes to denote commentary and
11
# semicolons for parts of the file you may wish to configure.
12
#
13
# NOTE: Run the "testparm" command after modifying this file to check for basic
14
# syntax errors.
15
#
16
#---------------
17
# Security-Enhanced Linux (SELinux) Notes:
18
#
19
# Turn the samba_domain_controller Boolean on to allow a Samba PDC to use the
20
# useradd and groupadd family of binaries. Run the following command as the
21
# root user to turn this Boolean on:
22
# setsebool -P samba_domain_controller on
23
#
24
# Turn the samba_enable_home_dirs Boolean on if you want to share home
25
# directories via Samba. Run the following command as the root user to turn this
26
# Boolean on:
27
# setsebool -P samba_enable_home_dirs on
28
#
29
# If you create a new directory, such as a new top-level directory, label it
30
# with samba_share_t so that SELinux allows Samba to read and write to it. Do
31
# not label system directories, such as /etc/ and /home/, with samba_share_t, as
32
# such directories should already have an SELinux label.
33
#
34
# Run the "ls -ldZ /path/to/directory" command to view the current SELinux
35
# label for a given directory.
36
#
37
# Set SELinux labels only on files and directories you have created. Use the
38
# chcon command to temporarily change a label:
39
# chcon -t samba_share_t /path/to/directory
40
#
41
# Changes made via chcon are lost when the file system is relabeled or commands
42
# such as restorecon are run.
43
#
44
# Use the samba_export_all_ro or samba_export_all_rw Boolean to share system
45
# directories. To share such directories and only allow read-only permissions:
46
# setsebool -P samba_export_all_ro on
47
# To share such directories and allow read and write permissions:
48
# setsebool -P samba_export_all_rw on
49
#
50
# To run scripts (preexec/root prexec/print command/...), copy them to the
51
# /var/lib/samba/scripts/ directory so that SELinux will allow smbd to run them.
52
# Note that if you move the scripts to /var/lib/samba/scripts/, they retain
53
# their existing SELinux labels, which may be labels that SELinux does not allow
54
# smbd to run. Copying the scripts will result in the correct SELinux labels.
55
# Run the "restorecon -R -v /var/lib/samba/scripts" command as the root user to
56
# apply the correct SELinux labels to these files.
57
#
58
#--------------
59
#
60
#======================= Global Settings =====================================
61
 
62
[global]
63
 
64
# ----------------------- Network-Related Options -------------------------
65
#
66
# workgroup = the Windows NT domain name or workgroup name, for example, MYGROUP.
67
#
68
# server string = the equivalent of the Windows NT Description field.
69
#
70
# netbios name = used to specify a server name that is not tied to the hostname,
71
#                maximum is 15 characters.
72
#
73
# interfaces = used to configure Samba to listen on multiple network interfaces.
74
# If you have multiple interfaces, you can use the "interfaces =" option to
75
# configure which of those interfaces Samba listens on. Never omit the localhost
76
# interface (lo).
77
#
78
# hosts allow = the hosts allowed to connect. This option can also be used on a
79
# per-share basis.
80
#
81
# hosts deny = the hosts not allowed to connect. This option can also be used on
82
# a per-share basis.
83
#
84
	workgroup = MYGROUP
85
	server string = Samba Server Version %v
86
 
87
;	netbios name = MYSERVER
88
 
89
;	interfaces = lo eth0 192.168.12.2/24 192.168.13.2/24
90
;	hosts allow = 127. 192.168.12. 192.168.13.
91
 
92
# --------------------------- Logging Options -----------------------------
93
#
94
# log file = specify where log files are written to and how they are split.
95
#
96
# max log size = specify the maximum size log files are allowed to reach. Log
97
# files are rotated when they reach the size specified with "max log size".
98
#
99
 
100
	# log files split per-machine:
101
	log file = /var/log/samba/log.%m
102
	# maximum size of 50KB per log file, then rotate:
103
	max log size = 50
104
 
105
# ----------------------- Standalone Server Options ------------------------
106
#
107
# security = the mode Samba runs in. This can be set to user, share
108
# (deprecated), or server (deprecated).
109
#
110
# passdb backend = the backend used to store user information in. New
111
# installations should use either tdbsam or ldapsam. No additional configuration
112
# is required for tdbsam. The "smbpasswd" utility is available for backwards
113
# compatibility.
114
#
115
 
116
	security = user
117
	passdb backend = tdbsam
118
 
119
 
120
# ----------------------- Domain Members Options ------------------------
121
#
122
# security = must be set to domain or ads.
123
#
124
# passdb backend = the backend used to store user information in. New
125
# installations should use either tdbsam or ldapsam. No additional configuration
126
# is required for tdbsam. The "smbpasswd" utility is available for backwards
127
# compatibility.
128
#
129
# realm = only use the realm option when the "security = ads" option is set.
130
# The realm option specifies the Active Directory realm the host is a part of.
131
#
132
# password server = only use this option when the "security = server"
133
# option is set, or if you cannot use DNS to locate a Domain Controller. The
134
# argument list can include My_PDC_Name, [My_BDC_Name], and [My_Next_BDC_Name]:
135
#
136
# password server = My_PDC_Name [My_BDC_Name] [My_Next_BDC_Name]
137
#
138
# Use "password server = *" to automatically locate Domain Controllers.
139
 
140
;	security = domain
141
;	passdb backend = tdbsam
142
;	realm = MY_REALM
143
 
144
;	password server = <NT-Server-Name>
145
 
146
# ----------------------- Domain Controller Options ------------------------
147
#
148
# security = must be set to user for domain controllers.
149
#
150
# passdb backend = the backend used to store user information in. New
151
# installations should use either tdbsam or ldapsam. No additional configuration
152
# is required for tdbsam. The "smbpasswd" utility is available for backwards
153
# compatibility.
154
#
155
# domain master = specifies Samba to be the Domain Master Browser, allowing
156
# Samba to collate browse lists between subnets. Do not use the "domain master"
157
# option if you already have a Windows NT domain controller performing this task.
158
#
159
# domain logons = allows Samba to provide a network logon service for Windows
160
# workstations.
161
#
162
# logon script = specifies a script to run at login time on the client. These
163
# scripts must be provided in a share named NETLOGON.
164
#
165
# logon path = specifies (with a UNC path) where user profiles are stored.
166
#
167
#
168
;	security = user
169
;	passdb backend = tdbsam
170
 
171
;	domain master = yes
172
;	domain logons = yes
173
 
174
	# the following login script name is determined by the machine name
175
	# (%m):
176
;	logon script = %m.bat
177
	# the following login script name is determined by the UNIX user used:
178
;	logon script = %u.bat
179
;	logon path = \\%L\Profiles\%u
180
	# use an empty path to disable profile support:
181
;	logon path =
182
 
183
	# various scripts can be used on a domain controller or a stand-alone
184
	# machine to add or delete corresponding UNIX accounts:
185
 
186
;	add user script = /usr/sbin/useradd "%u" -n -g users
187
;	add group script = /usr/sbin/groupadd "%g"
188
;	add machine script = /usr/sbin/useradd -n -c "Workstation (%u)" -M -d /nohome -s /bin/false "%u"
189
;	delete user script = /usr/sbin/userdel "%u"
190
;	delete user from group script = /usr/sbin/userdel "%u" "%g"
191
;	delete group script = /usr/sbin/groupdel "%g"
192
 
193
 
194
# ----------------------- Browser Control Options ----------------------------
195
#
196
# local master = when set to no, Samba does not become the master browser on
197
# your network. When set to yes, normal election rules apply.
198
#
199
# os level = determines the precedence the server has in master browser
200
# elections. The default value should be reasonable.
201
#
202
# preferred master = when set to yes, Samba forces a local browser election at
203
# start up (and gives itself a slightly higher chance of winning the election).
204
#
205
;	local master = no
206
;	os level = 33
207
;	preferred master = yes
208
 
209
#----------------------------- Name Resolution -------------------------------
210
#
211
# This section details the support for the Windows Internet Name Service (WINS).
212
#
213
# Note: Samba can be either a WINS server or a WINS client, but not both.
214
#
215
# wins support = when set to yes, the NMBD component of Samba enables its WINS
216
# server.
217
#
218
# wins server = tells the NMBD component of Samba to be a WINS client.
219
#
220
# wins proxy = when set to yes, Samba answers name resolution queries on behalf
221
# of a non WINS capable client. For this to work, there must be at least one
222
# WINS server on the network. The default is no.
223
#
224
# dns proxy = when set to yes, Samba attempts to resolve NetBIOS names via DNS
225
# nslookups.
226
 
227
;	wins support = yes
228
;	wins server = w.x.y.z
229
;	wins proxy = yes
230
 
231
;	dns proxy = yes
232
 
233
# --------------------------- Printing Options -----------------------------
234
#
235
# The options in this section allow you to configure a non-default printing
236
# system.
237
#
238
# load printers = when set you yes, the list of printers is automatically
239
# loaded, rather than setting them up individually.
240
#
241
# cups options = allows you to pass options to the CUPS library. Setting this
242
# option to raw, for example, allows you to use drivers on your Windows clients.
243
#
244
# printcap name = used to specify an alternative printcap file.
245
#
246
 
247
	load printers = yes
248
	cups options = raw
249
 
250
;	printcap name = /etc/printcap
251
	# obtain a list of printers automatically on UNIX System V systems:
252
;	printcap name = lpstat
253
;	printing = cups
254
 
255
# --------------------------- File System Options ---------------------------
256
#
257
# The options in this section can be un-commented if the file system supports
258
# extended attributes, and those attributes are enabled (usually via the
259
# "user_xattr" mount option). These options allow the administrator to specify
260
# that DOS attributes are stored in extended attributes and also make sure that
261
# Samba does not change the permission bits.
262
#
263
# Note: These options can be used on a per-share basis. Setting them globally
264
# (in the [global] section) makes them the default for all shares.
265
 
266
;	map archive = no
267
;	map hidden = no
268
;	map read only = no
269
;	map system = no
270
;	store dos attributes = yes
271
 
272
 
273
#============================ Share Definitions ==============================
274
 
275
[homes]
276
	comment = Home Directories
277
	browseable = no
278
	writable = yes
279
;	valid users = %S
280
;	valid users = MYDOMAIN\%S
281
 
282
[printers]
283
	comment = All Printers
284
	path = /var/spool/samba
285
	browseable = no
286
	guest ok = no
287
	writable = no
288
	printable = yes
289
 
290
# Un-comment the following and create the netlogon directory for Domain Logons:
291
;	[netlogon]
292
;	comment = Network Logon Service
293
;	path = /var/lib/samba/netlogon
294
;	guest ok = yes
295
;	writable = no
296
;	share modes = no
297
 
298
# Un-comment the following to provide a specific roaming profile share.
299
# The default is to use the user's home directory:
300
;	[Profiles]
301
;	path = /var/lib/samba/profiles
302
;	browseable = no
303
;	guest ok = yes
304
 
305
# A publicly accessible directory that is read only, except for users in the
306
# "staff" group (which have write permissions):
307
;	[public]
308
;	comment = Public Stuff
309
;	path = /home/samba
310
;	public = yes
311
;	writable = no
312
;	printable = no
313
;	write list = +staff