This commit was manufactured by cvs2svn to create branch 'SAMBA_3_0'.(This used to...
[gd/samba-autobuild/.git] / packaging / Mandrake / smb.conf
1
2 # This is the main Samba configuration file. You should read the
3 # smb.conf(5) manual page in order to understand the options listed
4 # here. Samba has a huge number of configurable options (perhaps too
5 # many!) most of which are not shown in this example
6 #
7 # Any line which starts with a ; (semi-colon) or a # (hash) 
8 # is a comment and is ignored. In this example we will use a #
9 # for commentry and a ; for parts of the config file that you
10 # may wish to enable
11 #
12 # NOTE: Whenever you modify this file you should run the command "testparm"
13 # to check that you have not made any basic syntactic errors. 
14 #
15 #======================= Global Settings =====================================
16 [global]
17
18 # 1. Server Naming Options:
19 # workgroup = NT-Domain-Name or Workgroup-Name
20    workgroup = MDKGROUP
21
22 # netbios name is the name you will see in "Network Neighbourhood",
23 # but defaults to your hostname
24 ;  netbios name = <name_of_this_server>
25
26 # server string is the equivalent of the NT Description field
27    server string = Samba Server %v
28
29 # Message command is run by samba when a "popup" message is sent to it.
30 # The example below is for use with LinPopUp:
31 ; message command = /usr/bin/linpopup "%f" "%m" %s; rm %s
32
33 # 2. Printing Options:
34 # CHANGES TO ENABLE PRINTING ON ALL CUPS PRINTERS IN THE NETWORK
35 # (as cups is now used in linux-mandrake 7.2 by default)
36 # if you want to automatically load your printer list rather
37 # than setting them up individually then you'll need this
38    printcap name = lpstat
39    load printers = yes
40
41 # It should not be necessary to spell out the print system type unless
42 # yours is non-standard. Currently supported print systems include:
43 # bsd, sysv, plp, lprng, aix, hpux, qnx, cups
44    printing = cups
45
46 # Samba 2.2 supports the Windows NT-style point-and-print feature. To
47 # use this, you need to be able to upload print drivers to the samba
48 # server. The printer admins (or root) may install drivers onto samba.
49 # Note that this feature uses the print$ share, so you will need to 
50 # enable it below.
51 # This parameter works like domain admin group:
52 # printer admin = @<group> <user>
53 ;   printer admin = @adm
54 # This should work well for winbind:
55 ;   printer admin = @"Domain Admins"
56
57 # 3. Logging Options:
58 # this tells Samba to use a separate log file for each machine
59 # that connects
60    log file = /var/log/samba/log.%m
61
62 # Put a capping on the size of the log files (in Kb).
63    max log size = 50
64
65 # Set the log (verbosity) level (0 <= log level <= 10)
66 ; log level = 3
67
68 # 4. Security and Domain Membership Options:
69 # This option is important for security. It allows you to restrict
70 # connections to machines which are on your local network. The
71 # following example restricts access to two C class networks and
72 # the "loopback" interface. For more examples of the syntax see
73 # the smb.conf man page. Do not enable this if (tcp/ip) name resolution does
74 # not work for all the hosts in your network.
75 ;   hosts allow = 192.168.1. 192.168.2. 127.
76
77 # Uncomment this if you want a guest account, you must add this to /etc/passwd
78 # otherwise the user "nobody" is used
79 ;  guest account = pcguest
80 # Allow users to map to guest:
81   map to guest = bad user
82
83 # Security mode. Most people will want user level security. See
84 # security_level.txt for details.
85    security = user
86 # Use password server option only with security = server or security = domain
87 # When using security = domain, you should use password server = *
88 ;   password server = <NT-Server-Name>
89 ;   password server = *
90
91 # Password Level allows matching of _n_ characters of the password for
92 # all combinations of upper and lower case.
93 ;  password level = 8
94 ;  username level = 8
95
96 # You may wish to use password encryption. Please read
97 # ENCRYPTION.txt, Win95.txt and WinNT.txt in the Samba documentation.
98 # Do not enable this option unless you have read those documents
99 # Encrypted passwords are required for any use of samba in a Windows NT domain
100 # The smbpasswd file is only required by a server doing authentication, thus
101 # members of a domain do not need one.
102   encrypt passwords = yes
103   smb passwd file = /etc/samba/smbpasswd
104
105 # The following are needed to allow password changing from Windows to
106 # also update the Linux system password.
107 # NOTE: Use these with 'encrypt passwords' and 'smb passwd file' above.
108 # NOTE2: You do NOT need these to allow workstations to change only
109 #        the encrypted SMB passwords. They allow the Unix password
110 #        to be kept in sync with the SMB password.
111 ;  unix password sync = Yes
112 # You either need to setup a passwd program and passwd chat, or
113 # enable pam password change
114 ;  pam password change = yes
115 ;  passwd program = /usr/bin/passwd %u
116 ;  passwd chat = *New*UNIX*password* %n\n *ReType*new*UNIX*password* %n\n
117 ;*passwd:*all*authentication*tokens*updated*successfully*
118
119 # Unix users can map to different SMB User names
120 ;  username map = /etc/samba/smbusers
121
122 # Using the following line enables you to customise your configuration
123 # on a per machine basis. The %m gets replaced with the netbios name
124 # of the machine that is connecting
125 ;   include = /etc/samba/smb.conf.%m
126
127 # Options for using winbind. Winbind allows you to do all account and
128 # authentication from a Windows or samba domain controller, creating
129 # accounts on the fly, and maintaining a mapping of Windows RIDs to unix uid's 
130 # and gid's. winbind uid and winbind gid are the only required parameters.
131 #
132 # winbind uid is the range of uid's winbind can use when mapping RIDs to uid's
133 ;  winbind uid = 10000-20000
134 #
135 # winbind gid is the range of uid's winbind can use when mapping RIDs to gid's
136 ;  winbind gid = 10000-20000
137 #
138 # winbind separator is the character a user must use between their domain
139 # name and username, defaults to "\"
140 ;  winbind separator = +
141 #
142 # winbind use default domain allows you to have winbind return usernames
143 # in the form user instead of DOMAIN+user for the domain listed in the
144 # workgroup parameter.
145 ;  winbind use default domain = yes
146 #
147 # template homedir determines the home directory for winbind users, with 
148 # %D expanding to their domain name and %U expanding to their username:
149 ;  template homedir = /home/%D/%U
150
151 # When using winbind, you may want to have samba create home directories
152 # on the fly for authenticated users. Ensure that /etc/pam.d/samba is
153 # using 'service=system-auth-winbind' in pam_stack modules, and then
154 # enable obedience of pam restrictions below:
155 ;  obey pam restrictions = yes
156
157 #
158 # template shell determines the shell users authenticated by winbind get
159 ;  template shell = /bin/bash
160
161 # 5. Browser Control and Networking Options:
162 # Most people will find that this option gives better performance.
163 # See speed.txt and the manual pages for details
164    socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
165
166 # Configure Samba to use multiple interfaces
167 # If you have multiple network interfaces then you must list them
168 # here. See the man page for details.
169 ;   interfaces = 192.168.12.2/24 192.168.13.2/24 
170
171 # Configure remote browse list synchronisation here
172 #  request announcement to, or browse list sync from:
173 #       a specific host or from / to a whole subnet (see below)
174 ;   remote browse sync = 192.168.3.25 192.168.5.255
175 # Cause this host to announce itself to local subnets here
176 ;   remote announce = 192.168.1.255 192.168.2.44
177
178 # set local master to no if you don't want Samba to become a master
179 # browser on your network. Otherwise the normal election rules apply
180 ;   local master = no
181
182 # OS Level determines the precedence of this server in master browser
183 # elections. The default value should be reasonable
184 ;   os level = 33
185
186 # Domain Master specifies Samba to be the Domain Master Browser. This
187 # allows Samba to collate browse lists between subnets. Don't use this
188 # if you already have a Windows NT domain controller doing this job
189 ;   domain master = yes 
190
191 # Preferred Master causes Samba to force a local browser election on startup
192 # and gives it a slightly higher chance of winning the election
193 ;   preferred master = yes
194
195 # 6. Domain Control Options:
196 # Enable this if you want Samba to be a domain logon server for 
197 # Windows95 workstations or Primary Domain Controller for WinNT and Win2k
198 ;   domain logons = yes
199
200 # if you enable domain logons then you may want a per-machine or
201 # per user logon script
202 # run a specific logon batch file per workstation (machine)
203 ;   logon script = %m.bat
204 # run a specific logon batch file per username
205 ;   logon script = %U.bat
206
207 # Where to store roaming profiles for WinNT and Win2k
208 #        %L substitutes for this servers netbios name, %U is username
209 #        You must uncomment the [Profiles] share below
210 ;   logon path = \\%L\Profiles\%U
211
212 # Where to store roaming profiles for Win9x. Be careful with this as it also
213 # impacts where Win2k finds it's /HOME share
214 ; logon home = \\%L\%U\.profile
215
216 # The add user script is used by a domain member to add local user accounts
217 # that have been authenticated by the domain controller.
218 # Script for domain member for adding local accounts for authenticated users:
219 ; add user script = /usr/sbin/useradd -s /bin/false %u
220
221 # The add machine script is use by a samba server configured as a domain
222 # controller to add local machine accounts when adding machines to the domain.
223 # The script must work from the command line when replacing the macros,
224 # or the operation will fail. Check that groups exist if forcing a group.
225 # Script for domain controller for adding machines:
226 ; add machine script = /usr/sbin/useradd -d /dev/null -g machines -c 'Machine Account' -s /bin/false -M %u
227 # Script for domain controller with LDAP backend for adding machines (please
228 # configure in /etc/samba/smbldap_conf.pm first):
229 ; add machine script = /usr/share/samba/scripts/smbldap-useradd.pl -w -d /dev/null -g machines -c 'Machine Account' -s /bin/false %u
230
231 # Domain groups:
232 # Domain groups are now configured by using the 'net groupmap' tool
233
234 # Samba Password Database configuration:
235 # Samba now has runtime-configurable password database backends. Multiple
236 # passdb backends may be used, but users will only be added to the first one
237 # Default:
238 ; passdb backend = smbpasswd unixsam
239 # TDB backen with fallback to smbpasswd and unixsam
240 ; passdb backend = tdbsam_nua smbpasswd unixsam
241 # LDAP with fallback to smbpasswd unixsam
242 # Enable SSL by using an ldaps url, or enable tls with 'ldap ssl' below.
243 ; passdb backend = ldapsam_nua:ldaps://ldap.mydomain.com smbpasswd unixsam
244
245 # Non-unix account range:
246 # This is a range of unix user-id's that samba will map non-unix RIDs to,
247 # such as machine accounts, when using a _nua passdb backend
248  non unix account range = 10000-20000
249   
250 # LDAP configuration for Domain Controlling:
251 # The account (dn) that samba uses to access the LDAP server
252 # This account needs to have write access to the LDAP tree
253 # You will need to give samba the password for this dn, by 
254 # running 'smbpasswd -w mypassword'
255 ; ldap admin dn = cn=root,dc=mydomain,dc=com
256 ; ldap ssl = start_tls
257 # start_tls should run on 389, but samba defaults incorrectly to 636
258 ; ldap port = 389
259 ; ldap suffix = dc=mydomain,dc=com
260 ; ldap server = ldap.mydomain.com
261
262
263 # 7. Name Resolution Options:
264 # All NetBIOS names must be resolved to IP Addresses
265 # 'Name Resolve Order' allows the named resolution mechanism to be specified
266 # the default order is "host lmhosts wins bcast". "host" means use the unix
267 # system gethostbyname() function call that will use either /etc/hosts OR
268 # DNS or NIS depending on the settings of /etc/host.config, /etc/nsswitch.conf
269 # and the /etc/resolv.conf file. "host" therefore is system configuration
270 # dependant. This parameter is most often of use to prevent DNS lookups
271 # in order to resolve NetBIOS names to IP Addresses. Use with care!
272 # The example below excludes use of name resolution for machines that are NOT
273 # on the local network segment
274 # - OR - are not deliberately to be known via lmhosts or via WINS.
275 ; name resolve order = wins lmhosts bcast
276
277 # Windows Internet Name Serving Support Section:
278 # WINS Support - Tells the NMBD component of Samba to enable it's WINS Server
279 ;   wins support = yes
280
281 # WINS Server - Tells the NMBD components of Samba to be a WINS Client
282 #       Note: Samba can be either a WINS Server, or a WINS Client, but NOT both
283 ;   wins server = w.x.y.z
284
285 # WINS Proxy - Tells Samba to answer name resolution queries on
286 # behalf of a non WINS capable client, for this to work there must be
287 # at least one  WINS Server on the network. The default is NO.
288 ;   wins proxy = yes
289
290 # DNS Proxy - tells Samba whether or not to try to resolve NetBIOS names
291 # via DNS nslookups. The built-in default for versions 1.9.17 is yes,
292 # this has been changed in version 1.9.18 to no.
293    dns proxy = no 
294
295 # 8. File Naming Options:
296 # Case Preservation can be handy - system default is _no_
297 # NOTE: These can be set on a per share basis
298 ;  preserve case = no
299 ;  short preserve case = no
300 # Default case is normally upper case for all DOS files
301 ;  default case = lower
302 # Be very careful with case sensitivity - it can break things!
303 ;  case sensitive = no
304
305 # Enabling internationalization:
306 # you can match a Windows code page with a UNIX character set.
307 # Windows: 437 (US), 737 (GREEK), 850 (Latin1 - Western European),
308 # 852 (Eastern Eu.), 861 (Icelandic), 932 (Cyrillic - Russian),
309 # 936 (Japanese - Shift-JIS), 936 (Simpl. Chinese), 949 (Korean Hangul),
310 # 950 (Trad. Chin.).
311 # UNIX: ISO8859-1 (Western European), ISO8859-2 (Eastern Eu.),
312 # ISO8859-5 (Russian Cyrillic), KOI8-R (Alt-Russ. Cyril.)
313 # This is an example for french users:
314 ;   dos charset = 850
315 ;   unix charset = ISO8859-1
316
317
318 #============================ Share Definitions ==============================
319 [homes]
320    comment = Home Directories
321    browseable = no
322    writable = yes
323 # You can enable VFS recycle bin on a per share basis:
324 # Uncomment the next 2 lines (make sure you create a
325 # .recycle folder in the base of the share and ensure
326 # all users will have write access to it. See
327 # examples/VFS/recycle/REAME in samba-doc for details
328 ;   vfs object = /usr/lib/samba/vfs/recycle.so
329 ;   vfs options= /etc/samba/recycle.conf
330
331 # Un-comment the following and create the netlogon directory for Domain Logons
332 ; [netlogon]
333 ;   comment = Network Logon Service
334 ;   path = /var/lib/samba/netlogon
335 ;   guest ok = yes
336 ;   writable = no
337
338 #Uncomment the following 2 lines if you would like your login scripts to
339 #be created dynamically by ntlogon (check that you have it in the correct
340 #location (the default of the ntlogon rpm available in contribs)
341 ;root preexec = /usr/bin/ntlogon -u %U -g %G -o %a -d /var/lib/samba/netlogon
342 ;root postexec = rm -f /var/lib/samba/netlogon/%U.bat
343
344 # Un-comment the following to provide a specific roving profile share
345 # the default is to use the user's home directory
346 ;[Profiles]
347 ;    path = /var/lib/samba/profiles
348 ;    browseable = no
349 ;    guest ok = yes
350
351
352 # NOTE: If you have a CUPS print system there is no need to 
353 # specifically define each individual printer.
354 # You must configure the samba printers with the appropriate Windows
355 # drivers on your Windows clients. On the Samba server no filtering is
356 # done. If you wish that the server provides the driver and the clients
357 # send PostScript ("Generic PostScript Printer" under Windows), you have
358 # to swap the 'print command' line below with the commented one.
359 [printers]
360    comment = All Printers
361    path = /var/spool/samba
362    browseable = no
363 # to allow user 'guest account' to print.
364    guest ok = yes
365    writable = no
366    printable = yes
367    create mode = 0700
368 # =====================================
369 # print command: see above for details.
370 # =====================================
371    print command = lpr-cups -P %p -o raw %s -r   # using client side printer drivers.
372 ;   print command = lpr-cups -P %p %s # using cups own drivers (use generic PostScript on clients).
373 # The following two commands are the samba defaults for printing=cups
374 # change them only if you need different options:
375 ;   lpq command = lpq -P %p
376 ;   lprm command = cancel %p-%j
377
378 # This share is used for Windows NT-style point-and-print support.
379 # To be able to install drivers, you need to be either root, or listed
380 # in the printer admin parameter above. Note that you also need write access
381 # to the directory and share definition to be able to upload the drivers.
382 # For more information on this, please see the Printing Support Section of
383 # /usr/share/doc/samba-<version>/docs/Samba-HOWTO-Collection.pdf 
384 [print$]
385    path = /var/lib/samba/printers
386    browseable = yes
387    read only = yes
388    write list = @adm root
389    guest ok = yes
390
391 # A useful application of samba is to make a PDF-generation service
392 # To streamline this, install windows postscript drivers (preferably colour)
393 # on the samba server, so that clients can automatically install them.
394
395 [pdf-generator]
396    path = /var/tmp
397    guest ok = No
398    printable = Yes
399    comment = PDF Generator (only valid users)
400    #print command = /usr/share/samba/scripts/print-pdf file path win_path recipient IP &
401    print command = /usr/share/samba/scripts/print-pdf %s ~%u //%L/%u %m %I "%J" &
402
403 # This one is useful for people to share files
404 ;[tmp]
405 ;   comment = Temporary file space
406 ;   path = /tmp
407 ;   read only = no
408 ;   public = yes
409
410 # A publicly accessible directory, but read only, except for people in
411 # the "staff" group
412 ;[public]
413 ;   comment = Public Stuff
414 ;   path = /home/samba/public
415 ;   public = yes
416 ;   writable = no
417 ;   write list = @staff
418 # Audited directory through experimental VFS audit.so module:
419 # Uncomment next line.
420 ;   vfs object = /usr/lib/samba/vfs/audit.so
421
422 # Other examples. 
423 #
424 # A private printer, usable only by Fred. Spool data will be placed in Fred's
425 # home directory. Note that fred must have write access to the spool directory,
426 # wherever it is.
427 ;[fredsprn]
428 ;   comment = Fred's Printer
429 ;   valid users = fred
430 ;   path = /homes/fred
431 ;   printer = freds_printer
432 ;   public = no
433 ;   writable = no
434 ;   printable = yes
435
436 # A private directory, usable only by Fred. Note that Fred requires write
437 # access to the directory.
438 ;[fredsdir]
439 ;   comment = Fred's Service
440 ;   path = /usr/somewhere/private
441 ;   valid users = fred
442 ;   public = no
443 ;   writable = yes
444 ;   printable = no
445
446 # a service which has a different directory for each machine that connects
447 # this allows you to tailor configurations to incoming machines. You could
448 # also use the %u option to tailor it by user name.
449 # The %m gets replaced with the machine name that is connecting.
450 ;[pchome]
451 ;  comment = PC Directories
452 ;  path = /usr/pc/%m
453 ;  public = no
454 ;  writable = yes
455
456 # A publicly accessible directory, read/write to all users. Note that all files
457 # created in the directory by users will be owned by the default user, so
458 # any user with access can delete any other user's files. Obviously this
459 # directory must be writable by the default user. Another user could of course
460 # be specified, in which case all files would be owned by that user instead.
461 ;[public]
462 ;   path = /usr/somewhere/else/public
463 ;   public = yes
464 ;   only guest = yes
465 ;   writable = yes
466 ;   printable = no
467
468 # The following two entries demonstrate how to share a directory so that two
469 # users can place files there that will be owned by the specific users. In this
470 # setup, the directory should be writable by both users and should have the
471 # sticky bit set on it to prevent abuse. Obviously this could be extended to
472 # as many users as required.
473 ;[myshare]
474 ;   comment = Mary's and Fred's stuff
475 ;   path = /usr/somewhere/shared
476 ;   valid users = mary fred
477 ;   public = no
478 ;   writable = yes
479 ;   printable = no
480 ;   create mask = 0765
481