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
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
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.
15 #======================= Global Settings =====================================
18 # 1. Server Naming Options:
19 # workgroup = NT-Domain-Name or Workgroup-Name
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>
26 # server string is the equivalent of the NT Description field
27 server string = Samba Server %v
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
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
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
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
51 # This parameter works like domain admin group:
52 # printer admin = @<group> <user>
53 ; printer admin = @adm
56 # this tells Samba to use a separate log file for each machine
58 log file = /var/log/samba/log.%m
60 # Put a capping on the size of the log files (in Kb).
63 # Set the log (verbosity) level (0 <= log level <= 10)
66 # 4. Security and Domain Membership Options:
67 # This option is important for security. It allows you to restrict
68 # connections to machines which are on your local network. The
69 # following example restricts access to two C class networks and
70 # the "loopback" interface. For more examples of the syntax see
71 # the smb.conf man page. Do not enable this if (tcp/ip) name resolution does
72 # not work for all the hosts in your network.
73 ; hosts allow = 192.168.1. 192.168.2. 127.
75 # Uncomment this if you want a guest account, you must add this to /etc/passwd
76 # otherwise the user "nobody" is used
77 ; guest account = pcguest
79 # Security mode. Most people will want user level security. See
80 # security_level.txt for details.
82 # Use password server option only with security = server or security = domain
83 # When using security = domain, you should use password server = *
84 ; password server = <NT-Server-Name>
87 # Password Level allows matching of _n_ characters of the password for
88 # all combinations of upper and lower case.
92 # You may wish to use password encryption. Please read
93 # ENCRYPTION.txt, Win95.txt and WinNT.txt in the Samba documentation.
94 # Do not enable this option unless you have read those documents
95 # Encrypted passwords are required for any use of samba in a Windows NT domain
96 # The smbpasswd file is only required by a server doing authentication, thus
97 # members of a domain do not need one.
98 encrypt passwords = yes
99 smb passwd file = /etc/samba/smbpasswd
101 # The following are needed to allow password changing from Windows to
102 # also update the Linux system password.
103 # NOTE: Use these with 'encrypt passwords' and 'smb passwd file' above.
104 # NOTE2: You do NOT need these to allow workstations to change only
105 # the encrypted SMB passwords. They allow the Unix password
106 # to be kept in sync with the SMB password.
107 ; unix password sync = Yes
108 ; passwd program = /usr/bin/passwd %u
109 ; passwd chat = *New*UNIX*password* %n\n *ReType*new*UNIX*password* %n\n
110 ;*passwd:*all*authentication*tokens*updated*successfully*
112 # Unix users can map to different SMB User names
113 ; username map = /etc/samba/smbusers
115 # Using the following line enables you to customise your configuration
116 # on a per machine basis. The %m gets replaced with the netbios name
117 # of the machine that is connecting
118 ; include = /etc/samba/smb.conf.%m
120 # Options for using winbind. Winbind allows you to do all account and
121 # authentication from a Windows or samba domain controller, creating
122 # accounts on the fly, and maintaining a mapping of Windows RIDs to unix uid's
123 # and gid's. winbind uid and winbind gid are the only required parameters.
125 # winbind uid is the range of uid's winbind can use when mapping RIDs to uid's
126 ; winbind uid = 10000-20000
128 # winbind gid is the range of uid's winbind can use when mapping RIDs to gid's
129 ; winbind gid = 10000-20000
131 # winbind separator is the character a user must use between their domain
132 # name and username, defaults to "\"
133 ; winbind separator = +
135 # template homedir determines the home directory for winbind users, with
136 # %D expanding to their domain name and %U expanding to their username:
137 ; template homedir = /home/%D/%U
139 # template shell determines the shell users authenticated by winbind get
140 ; template shell = /bin/bash
142 # 5. Browser Control and Networking Options:
143 # Most people will find that this option gives better performance.
144 # See speed.txt and the manual pages for details
145 socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
147 # Configure Samba to use multiple interfaces
148 # If you have multiple network interfaces then you must list them
149 # here. See the man page for details.
150 ; interfaces = 192.168.12.2/24 192.168.13.2/24
152 # Configure remote browse list synchronisation here
153 # request announcement to, or browse list sync from:
154 # a specific host or from / to a whole subnet (see below)
155 ; remote browse sync = 192.168.3.25 192.168.5.255
156 # Cause this host to announce itself to local subnets here
157 ; remote announce = 192.168.1.255 192.168.2.44
159 # set local master to no if you don't want Samba to become a master
160 # browser on your network. Otherwise the normal election rules apply
163 # OS Level determines the precedence of this server in master browser
164 # elections. The default value should be reasonable
167 # Domain Master specifies Samba to be the Domain Master Browser. This
168 # allows Samba to collate browse lists between subnets. Don't use this
169 # if you already have a Windows NT domain controller doing this job
170 ; domain master = yes
172 # Preferred Master causes Samba to force a local browser election on startup
173 # and gives it a slightly higher chance of winning the election
174 ; preferred master = yes
176 # 6. Domain Control Options:
177 # Enable this if you want Samba to be a domain logon server for
178 # Windows95 workstations or Primary Domain Controller for WinNT and Win2k
179 ; domain logons = yes
181 # if you enable domain logons then you may want a per-machine or
182 # per user logon script
183 # run a specific logon batch file per workstation (machine)
184 ; logon script = %m.bat
185 # run a specific logon batch file per username
186 ; logon script = %U.bat
188 # Where to store roaming profiles for WinNT and Win2k
189 # %L substitutes for this servers netbios name, %U is username
190 # You must uncomment the [Profiles] share below
191 ; logon path = \\%L\Profiles\%U
193 # Where to store roaming profiles for Win9x. Be careful with this as it also
194 # impacts where Win2k finds it's /HOME share
195 ; logon home = \\%L\%U\.profile
197 # The add user script is used by a domain member to add local user accounts
198 # that have been authenticated by the domain controller, or by the domain
199 # controller to add local machine accounts when adding machines to the domain.
200 # The script must work from the command line when replacing the macros,
201 # or the operation will fail. Check that groups exist if forcing a group.
202 # Script for domain controller for adding machines:
203 ; add user script = /usr/sbin/useradd -d /dev/null -g machines -c 'Machine Account' -s /bin/false -M %u
204 # Script for domain member for adding local accounts for authenticated users:
205 ; add user script = /usr/sbin/useradd -s /bin/false %u
208 # domain admin group is a list of unix users or groups who are made members
209 # of the Domain Admin group
210 ; domain admin group = root @wheel
212 # domain guest groups is a list of unix users or groups who are made members
213 # of the Domain Guests group
214 ; domain guest group = nobody @guest
216 # 7. Name Resolution Options:
217 # All NetBIOS names must be resolved to IP Addresses
218 # 'Name Resolve Order' allows the named resolution mechanism to be specified
219 # the default order is "host lmhosts wins bcast". "host" means use the unix
220 # system gethostbyname() function call that will use either /etc/hosts OR
221 # DNS or NIS depending on the settings of /etc/host.config, /etc/nsswitch.conf
222 # and the /etc/resolv.conf file. "host" therefore is system configuration
223 # dependant. This parameter is most often of use to prevent DNS lookups
224 # in order to resolve NetBIOS names to IP Addresses. Use with care!
225 # The example below excludes use of name resolution for machines that are NOT
226 # on the local network segment
227 # - OR - are not deliberately to be known via lmhosts or via WINS.
228 ; name resolve order = wins lmhosts bcast
230 # Windows Internet Name Serving Support Section:
231 # WINS Support - Tells the NMBD component of Samba to enable it's WINS Server
234 # WINS Server - Tells the NMBD components of Samba to be a WINS Client
235 # Note: Samba can be either a WINS Server, or a WINS Client, but NOT both
236 ; wins server = w.x.y.z
238 # WINS Proxy - Tells Samba to answer name resolution queries on
239 # behalf of a non WINS capable client, for this to work there must be
240 # at least one WINS Server on the network. The default is NO.
243 # DNS Proxy - tells Samba whether or not to try to resolve NetBIOS names
244 # via DNS nslookups. The built-in default for versions 1.9.17 is yes,
245 # this has been changed in version 1.9.18 to no.
248 # 8. File Naming Options:
249 # Case Preservation can be handy - system default is _no_
250 # NOTE: These can be set on a per share basis
252 ; short preserve case = no
253 # Default case is normally upper case for all DOS files
254 ; default case = lower
255 # Be very careful with case sensitivity - it can break things!
256 ; case sensitive = no
258 # Enabling internationalization:
259 # you can match a Windows code page with a UNIX character set.
260 # Windows: 437 (US), 737 (GREEK), 850 (Latin1 - Western European),
261 # 852 (Eastern Eu.), 861 (Icelandic), 932 (Cyrillic - Russian),
262 # 936 (Japanese - Shift-JIS), 936 (Simpl. Chinese), 949 (Korean Hangul),
264 # UNIX: ISO8859-1 (Western European), ISO8859-2 (Eastern Eu.),
265 # ISO8859-5 (Russian Cyrillic), KOI8-R (Alt-Russ. Cyril.)
266 # This is an example for french users:
267 ; client code page = 850
268 ; character set = ISO8859-1
271 #============================ Share Definitions ==============================
273 comment = Home Directories
277 # Un-comment the following and create the netlogon directory for Domain Logons
279 ; comment = Network Logon Service
280 ; path = /var/lib/samba/netlogon
284 #Uncomment the following 2 lines if you would like your login scripts to
285 #be created dynamically by ntlogon (check that you have it in the correct
286 #location (the default of the ntlogon rpm available in contribs)
287 ;root preexec = /usr/bin/ntlogon -u %U -g %G -o %a -d /var/lib/samba/netlogon
288 ;root postexec = rm -f /var/lib/samba/netlogon/%U.bat
290 # Un-comment the following to provide a specific roving profile share
291 # the default is to use the user's home directory
293 ; path = /var/lib/samba/profiles
298 # NOTE: If you have a CUPS print system there is no need to
299 # specifically define each individual printer.
300 # You must configure the samba printers with the appropriate Windows
301 # drivers on your Windows clients. On the Samba server no filtering is
302 # done. If you wish that the server provides the driver and the clients
303 # send PostScript ("Generic PostScript Printer" under Windows), you have
304 # to swap the 'print command' line below with the commented one.
306 comment = All Printers
307 path = /var/spool/samba
309 # to allow user 'guest account' to print.
314 # =====================================
315 # print command: see above for details.
316 # =====================================
317 print command = lpr-cups -P %p -o raw %s -r # using client side printer drivers.
318 ; print command = lpr-cups -P %p %s # using cups own drivers (use generic PostScript on clients).
319 # The following two commands are the samba defaults for printing=cups
320 # change them only if you need different options:
321 ; lpq command = lpq -P %p
322 ; lprm command = cancel %p-%j
324 # This share is used for Windows NT-style point-and-print support.
325 # To be able to install drivers, you need to be either root, or listed
326 # in the printer admin parameter above. Note that you also need write access
327 # to the directory and share definition to be able to upload the drivers.
328 # For more information on this, please see the Printing Support Section of
329 # /usr/share/doc/samba-<version>/docs/Samba-HOWTO-Collection.pdf
331 path = /var/lib/samba/printers
334 write list = @adm root
336 # This one is useful for people to share files
338 ; comment = Temporary file space
343 # A publicly accessible directory, but read only, except for people in
346 ; comment = Public Stuff
347 ; path = /home/samba/public
350 ; write list = @staff
354 # A private printer, usable only by Fred. Spool data will be placed in Fred's
355 # home directory. Note that fred must have write access to the spool directory,
358 ; comment = Fred's Printer
361 ; printer = freds_printer
366 # A private directory, usable only by Fred. Note that Fred requires write
367 # access to the directory.
369 ; comment = Fred's Service
370 ; path = /usr/somewhere/private
376 # a service which has a different directory for each machine that connects
377 # this allows you to tailor configurations to incoming machines. You could
378 # also use the %u option to tailor it by user name.
379 # The %m gets replaced with the machine name that is connecting.
381 ; comment = PC Directories
386 # A publicly accessible directory, read/write to all users. Note that all files
387 # created in the directory by users will be owned by the default user, so
388 # any user with access can delete any other user's files. Obviously this
389 # directory must be writable by the default user. Another user could of course
390 # be specified, in which case all files would be owned by that user instead.
392 ; path = /usr/somewhere/else/public
398 # The following two entries demonstrate how to share a directory so that two
399 # users can place files there that will be owned by the specific users. In this
400 # setup, the directory should be writable by both users and should have the
401 # sticky bit set on it to prevent abuse. Obviously this could be extended to
402 # as many users as required.
404 ; comment = Mary's and Fred's stuff
405 ; path = /usr/somewhere/shared
406 ; valid users = mary fred