~ubuntu-branches/ubuntu/dapper/kubuntu-docs/dapper-updates

« back to all changes in this revision

Viewing changes to kubuntu/desktopguide/C/sample/smb.conf_sharegroupfoldersreadwritesecurityuser

  • Committer: Bazaar Package Importer
  • Author(s): Jonathan Riddell
  • Date: 2006-02-15 20:55:55 UTC
  • Revision ID: james.westby@ubuntu.com-20060215205555-c4if7xcvdtir9lcf
Tags: 6.04-5
New snapshot

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#
 
2
# Sample configuration file for the Samba suite for Debian GNU/Linux.
 
3
#
 
4
#
 
5
# This is the main Samba configuration file. You should read the
 
6
# smb.conf(5) manual page in order to understand the options listed
 
7
# here. Samba has a huge number of configurable options most of which 
 
8
# are not shown in this example
 
9
#
 
10
# Any line which starts with a ; (semi-colon) or a # (hash) 
 
11
# is a comment and is ignored. In this example we will use a #
 
12
# for commentary and a ; for parts of the config file that you
 
13
# may wish to enable
 
14
#
 
15
# NOTE: Whenever you modify this file you should run the command
 
16
# "testparm" to check that you have not many any basic syntactic 
 
17
# errors. 
 
18
#
 
19
 
 
20
#======================= Global Settings =======================
 
21
 
 
22
[global]
 
23
 
 
24
## Browsing/Identification ###
 
25
 
 
26
# Change this to the workgroup/NT-domain name your Samba server will part of
 
27
   workgroup = MSHOME
 
28
 
 
29
# server string is the equivalent of the NT Description field
 
30
   server string = %h server (Samba, Ubuntu)
 
31
 
 
32
# Windows Internet Name Serving Support Section:
 
33
# WINS Support - Tells the NMBD component of Samba to enable its WINS Server
 
34
;   wins support = no
 
35
 
 
36
# WINS Server - Tells the NMBD components of Samba to be a WINS Client
 
37
# Note: Samba can be either a WINS Server, or a WINS Client, but NOT both
 
38
;   wins server = w.x.y.z
 
39
 
 
40
# This will prevent nmbd to search for NetBIOS names through DNS.
 
41
   dns proxy = no
 
42
 
 
43
# What naming service and in what order should we use to resolve host names
 
44
# to IP addresses
 
45
;   name resolve order = lmhosts host wins bcast
 
46
 
 
47
 
 
48
#### Debugging/Accounting ####
 
49
 
 
50
# This tells Samba to use a separate log file for each machine
 
51
# that connects
 
52
   log file = /var/log/samba/log.%m
 
53
 
 
54
# Put a capping on the size of the log files (in Kb).
 
55
   max log size = 1000
 
56
 
 
57
# If you want Samba to only log through syslog then set the following
 
58
# parameter to 'yes'.
 
59
;   syslog only = no
 
60
 
 
61
# We want Samba to log a minimum amount of information to syslog. Everything
 
62
# should go to /var/log/samba/log.{smbd,nmbd} instead. If you want to log
 
63
# through syslog you should set the following parameter to something higher.
 
64
   syslog = 0
 
65
 
 
66
# Do something sensible when Samba crashes: mail the admin a backtrace
 
67
   panic action = /usr/share/samba/panic-action %d
 
68
 
 
69
 
 
70
####### Authentication #######
 
71
 
 
72
# "security = user" is always a good idea. This will require a Unix account
 
73
# in this server for every user accessing the server. See
 
74
# /usr/share/doc/samba-doc/htmldocs/ServerType.html in the samba-doc
 
75
# package for details.
 
76
   security = user
 
77
   username map = /etc/samba/smbusers
 
78
 
 
79
# You may wish to use password encryption.  See the section on
 
80
# 'encrypt passwords' in the smb.conf(5) manpage before enabling.
 
81
   encrypt passwords = true
 
82
 
 
83
# If you are using encrypted passwords, Samba will need to know what
 
84
# password database type you are using.  
 
85
   passdb backend = tdbsam guest
 
86
 
 
87
   obey pam restrictions = yes
 
88
 
 
89
;   guest account = nobody
 
90
   invalid users = root
 
91
 
 
92
# This boolean parameter controls whether Samba attempts to sync the Unix
 
93
# password with the SMB password when the encrypted SMB password in the
 
94
# passdb is changed.
 
95
;   unix password sync = no
 
96
 
 
97
# For Unix password sync to work on a Debian GNU/Linux system, the following
 
98
# parameters must be set (thanks to Augustin Luton <aluton@hybrigenics.fr> for
 
99
# sending the correct chat script for the passwd program in Debian Potato).
 
100
   passwd program = /usr/bin/passwd %u
 
101
   passwd chat = *Enter\snew\sUNIX\spassword:* %n\n *Retype\snew\sUNIX\spassword:* %n\n .
 
102
 
 
103
# This boolean controls whether PAM will be used for password changes
 
104
# when requested by an SMB client instead of the program listed in
 
105
# 'passwd program'. The default is 'no'.
 
106
;   pam password change = no
 
107
 
 
108
 
 
109
########## Printing ##########
 
110
 
 
111
# If you want to automatically load your printer list rather
 
112
# than setting them up individually then you'll need this
 
113
;   load printers = yes
 
114
 
 
115
# lpr(ng) printing. You may wish to override the location of the
 
116
# printcap file
 
117
;   printing = bsd
 
118
;   printcap name = /etc/printcap
 
119
 
 
120
# CUPS printing.  See also the cupsaddsmb(8) manpage in the
 
121
# cupsys-client package.
 
122
;   printing = cups
 
123
;   printcap name = cups
 
124
 
 
125
# When using [print$], root is implicitly a 'printer admin', but you can
 
126
# also give this right to other users to add drivers and set printer
 
127
# properties
 
128
;   printer admin = @ntadmin
 
129
 
 
130
 
 
131
######## File sharing ########
 
132
 
 
133
# Name mangling options
 
134
;   preserve case = yes
 
135
;   short preserve case = yes
 
136
 
 
137
 
 
138
############ Misc ############
 
139
 
 
140
# Using the following line enables you to customise your configuration
 
141
# on a per machine basis. The %m gets replaced with the netbios name
 
142
# of the machine that is connecting
 
143
;   include = /home/samba/etc/smb.conf.%m
 
144
 
 
145
# Most people will find that this option gives better performance.
 
146
# See smb.conf(5) and /usr/share/doc/samba-doc/htmldocs/speed.html
 
147
# for details
 
148
# You may want to add the following on a Linux system:
 
149
#         SO_RCVBUF=8192 SO_SNDBUF=8192
 
150
   socket options = TCP_NODELAY
 
151
 
 
152
# The following parameter is useful only if you have the linpopup package
 
153
# installed. The samba maintainer and the linpopup maintainer are
 
154
# working to ease installation and configuration of linpopup and samba.
 
155
;   message command = /bin/sh -c '/usr/bin/linpopup "%f" "%m" %s; rm %s' &
 
156
 
 
157
# Domain Master specifies Samba to be the Domain Master Browser. If this
 
158
# machine will be configured as a BDC (a secondary logon server), you
 
159
# must set this to 'no'; otherwise, the default behavior is recommended.
 
160
;   domain master = auto
 
161
 
 
162
# Some defaults for winbind (make sure you're not using the ranges
 
163
# for something else.)
 
164
;   idmap uid = 10000-20000
 
165
;   idmap gid = 10000-20000
 
166
;   template shell = /bin/bash
 
167
 
 
168
#======================= Share Definitions =======================
 
169
 
 
170
[homes]
 
171
   comment = Home Directories
 
172
   browseable = no
 
173
 
 
174
# By default, the home directories are exported read-only. Change next
 
175
# parameter to 'yes' if you want to be able to write to them.
 
176
   writable = no
 
177
 
 
178
# File creation mask is set to 0700 for security reasons. If you want to
 
179
# create files with group=rw permissions, set next parameter to 0775.
 
180
   create mask = 0700
 
181
 
 
182
# Directory creation mask is set to 0700 for security reasons. If you want to
 
183
# create dirs. with group=rw permissions, set next parameter to 0775.
 
184
   directory mask = 0700
 
185
 
 
186
# Un-comment the following and create the netlogon directory for Domain Logons
 
187
# (you need to configure Samba to act as a domain controller too.)
 
188
;[netlogon]
 
189
;   comment = Network Logon Service
 
190
;   path = /home/samba/netlogon
 
191
;   guest ok = yes
 
192
;   writable = no
 
193
;   share modes = no
 
194
 
 
195
[printers]
 
196
   comment = All Printers
 
197
   browseable = no
 
198
   path = /tmp
 
199
   printable = yes
 
200
   public = no
 
201
   writable = no
 
202
   create mode = 0700
 
203
 
 
204
# Windows clients look for this share name as a source of downloadable
 
205
# printer drivers
 
206
[print$]
 
207
   comment = Printer Drivers
 
208
   path = /var/lib/samba/printers
 
209
   browseable = yes
 
210
   read only = yes
 
211
   guest ok = no
 
212
# Uncomment to allow remote administration of Windows print drivers.
 
213
# Replace 'ntadmin' with the name of the group your admin users are
 
214
# members of.
 
215
;   write list = root, @ntadmin
 
216
 
 
217
# A sample share for sharing your CD-ROM with others.
 
218
;[cdrom]
 
219
;   comment = Samba server's CD-ROM
 
220
;   writable = no
 
221
;   locking = no
 
222
;   path = /cdrom
 
223
;   public = yes
 
224
 
 
225
# The next two parameters show how to auto-mount a CD-ROM when the
 
226
#       cdrom share is accesed. For this to work /etc/fstab must contain
 
227
#       an entry like this:
 
228
#
 
229
#       /dev/scd0   /cdrom  iso9660 defaults,noauto,ro,user   0 0
 
230
#
 
231
# The CD-ROM gets unmounted automatically after the connection to the
 
232
#
 
233
# If you don't want to use auto-mounting/unmounting make sure the CD
 
234
#       is mounted on /cdrom
 
235
#
 
236
;   preexec = /bin/mount /cdrom
 
237
;   postexec = /bin/umount /cdrom
 
238
 
 
239
[Group]
 
240
   comment = Group Folder
 
241
   path = /home/group
 
242
   public = yes
 
243
   writable = yes
 
244
   valid users = system_username1 system_username2
 
245
   create mask = 0700
 
246
   directory mask = 0700
 
247
   force user = nobody
 
248
   force group = nogroup