由 txkss 在 08-28-2004 20:36 发表:
请解:大家帮我看一下我的samba配置文件
我在红帽AS3下配置了samba并启动了
在windows2000的工作组里看到了它可是我双击进入时等了一会就弹出对话框说无法访问找不到网络路径
我不知道是什么地方出了问题
下面是我的配置文件请大家看一下谢谢了
[root@linux2 root]# cat /etc/samba/smb.conf
This is the main Samba configuration file. You should read the
smb.conf(5) manual page in order to understand the options listed
here. Samba has a huge number of configurable options (perhaps too
many!) most of which are not shown in this example
Any line which starts with a ; (semi-colon) or a # (hash)
is a comment and is ignored. In this example we will use a
for commentry and a ; for parts of the config file that you
may wish to enable
NOTE: Whenever you modify this file you should run the command "testparm"
to check that you have not made any basic syntactic errors.
#======================= Global Settings =====================================
[global]
workgroup = NT-Domain-Name or Workgroup-Name
workgroup = workgroup
netbios name = SAMBA
smb passwd file = /etc/samba/smbpasswd
dos charset = CP936
display charset = CP936
unix charset = CP936
unix charset = cp936
server string is the equivalent of the NT Description field
server string = Samba Server
This option is important for security. It allows you to restrict
connections to machines which are on your local network. The
following example restricts access to two C class networks and
the "loopback" interface. For more examples of the syntax see
the smb.conf man page
; hosts allow = 192.168.1. 192.168.2. 127.
if you want to automatically load your printer list rather
than setting them up individually then you'll need this
printcap name = /etc/printcap
load printers = yes
It should not be necessary to spell out the print system type unless
yours is non-standard. Currently supported print systems include:
bsd, sysv, plp, lprng, aix, hpux, qnx
; printing = bsd
Uncomment this if you want a guest account, you must add this to /etc/passwd
otherwise the user "nobody" is used
; guest account = pcguest
this tells Samba to use a separate log file for each machine
that connects
log file = /var/log/samba/%m.log
Put a capping on the size of the log files (in Kb).
max log size = 50
Security mode. Most people will want user level security. See
security_level.txt for details.
security = share
Use password server option only with security = server
; password server =
1<nt-server-name>
2
3
4
5# Password Level allows matching of _n_ characters of the password for
6
7# all combinations of upper and lower case.
8
9; password level = 8
10
11; username level = 8
12
13
14
15# You may wish to use password encryption. Please read
16
17# ENCRYPTION.txt, Win95.txt and WinNT.txt in the Samba documentation.
18
19# Do not enable this option unless you have read those documents
20
21; encrypt passwords = yes
22
23; smb passwd file = /etc/samba/smbpasswd
24
25
26
27# The following are needed to allow password changing from Windows to
28
29# update the Linux system password also.
30
31# NOTE: Use these with 'encrypt passwords' and 'smb passwd file' above.
32
33# NOTE2: You do NOT need these to allow workstations to change only
34
35# the encrypted SMB passwords. They allow the Unix password
36
37# to be kept in sync with the SMB password.
38
39; unix password sync = Yes
40
41; passwd program = /usr/bin/passwd %u
42
43; passwd chat = *New*UNIX*password* %n\n *ReType*new*UNIX*password* %n\n *passwd:*all*authentication*tokens*updated*successfully*
44
45
46
47# Unix users can map to different SMB User names
48
49; username map = /etc/samba/smbusers
50
51
52
53# Using the following line enables you to customise your configuration
54
55# on a per machine basis. The %m gets replaced with the netbios name
56
57# of the machine that is connecting
58
59; include = /etc/samba/smb.conf.%m
60
61
62
63# Most people will find that this option gives better performance.
64
65# See speed.txt and the manual pages for details
66
67socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
68
69
70
71# Configure Samba to use multiple interfaces
72
73# If you have multiple network interfaces then you must list them
74
75# here. See the man page for details.
76
77; interfaces = 192.168.12.2/24 192.168.13.2/24
78
79
80
81# Configure remote browse list synchronisation here
82
83# request announcement to, or browse list sync from:
84
85# a specific host or from / to a whole subnet (see below)
86
87; remote browse sync = 192.168.3.25 192.168.5.255
88
89# Cause this host to announce itself to local subnets here
90
91; remote announce = 192.168.1.255 192.168.2.44
92
93
94
95# Browser Control Options:
96
97# set local master to no if you don't want Samba to become a master
98
99# browser on your network. Otherwise the normal election rules apply
100
101; local master = no
102
103
104
105# OS Level determines the precedence of this server in master browser
106
107# elections. The default value should be reasonable
108
109; os level = 33
110
111
112
113# Domain Master specifies Samba to be the Domain Master Browser. This
114
115# allows Samba to collate browse lists between subnets. Don't use this
116
117# if you already have a Windows NT domain controller doing this job
118
119; domain master = yes
120
121
122
123# Preferred Master causes Samba to force a local browser election on startup
124
125# and gives it a slightly higher chance of winning the election
126
127; preferred master = yes
128
129
130
131# Enable this if you want Samba to be a domain logon server for
132
133# Windows95 workstations.
134
135; domain logons = yes
136
137
138
139# if you enable domain logons then you may want a per-machine or
140
141# per user logon script
142
143# run a specific logon batch file per workstation (machine)
144
145; logon script = %m.bat
146
147# run a specific logon batch file per username
148
149; logon script = %U.bat
150
151
152
153# Where to store roving profiles (only for Win95 and WinNT)
154
155# %L substitutes for this servers netbios name, %U is username
156
157# You must uncomment the [Profiles] share below
158
159; logon path = \\\%L\Profiles\%U
160
161
162
163# All NetBIOS names must be resolved to IP Addresses
164
165# 'Name Resolve Order' allows the named resolution mechanism to be specified
166
167# the default order is "host lmhosts wins bcast". "host" means use the unix
168
169# system gethostbyname() function call that will use either /etc/hosts OR
170
171# DNS or NIS depending on the settings of /etc/host.config, /etc/nsswitch.conf
172
173# and the /etc/resolv.conf file. "host" therefore is system configuration
174
175# dependant. This parameter is most often of use to prevent DNS lookups
176
177# in order to resolve NetBIOS names to IP Addresses. Use with care!
178
179# The example below excludes use of name resolution for machines that are NOT
180
181# on the local network segment
182
183# - OR - are not deliberately to be known via lmhosts or via WINS.
184
185; name resolve order = wins lmhosts bcast
186
187
188
189# Windows Internet Name Serving Support Section:
190
191# WINS Support - Tells the NMBD component of Samba to enable it's WINS Server
192
193; wins support = yes
194
195
196
197# WINS Server - Tells the NMBD components of Samba to be a WINS Client
198
199# Note: Samba can be either a WINS Server, or a WINS Client, but NOT both
200
201; wins server = w.x.y.z
202
203
204
205# WINS Proxy - Tells Samba to answer name resolution queries on
206
207# behalf of a non WINS capable client, for this to work there must be
208
209# at least one WINS Server on the network. The default is NO.
210
211; wins proxy = yes
212
213
214
215# DNS Proxy - tells Samba whether or not to try to resolve NetBIOS names
216
217# via DNS nslookups. The built-in default for versions 1.9.17 is yes,
218
219# this has been changed in version 1.9.18 to no.
220
221dns proxy = no
222
223
224
225# Case Preservation can be handy - system default is _no_
226
227# NOTE: These can be set on a per share basis
228
229; preserve case = no
230
231; short preserve case = no
232
233# Default case is normally upper case for all DOS files
234
235; default case = lower
236
237# Be very careful with case sensitivity - it can break things!
238
239; case sensitive = no
240
241
242
243#============================ Share Definitions ==============================
244
245[homes]
246
247comment = Home Directories
248
249browseable = no
250
251writable = yes
252
253
254
255# Un-comment the following and create the netlogon directory for Domain Logons
256
257; [netlogon]
258
259; comment = Network Logon Service
260
261; path = /home/netlogon
262
263; guest ok = yes
264
265; writable = no
266
267; share modes = no
268
269
270
271
272
273# Un-comment the following to provide a specific roving profile share
274
275# the default is to use the user's home directory
276
277;[Profiles]
278
279; path = /home/profiles
280
281; browseable = no
282
283; guest ok = yes
284
285
286
287
288
289# NOTE: If you have a BSD-style print system there is no need to
290
291# specifically define each individual printer
292
293[printers]
294
295comment = All Printers
296
297path = /var/spool/samba
298
299browseable = no
300
301# Set public = yes to allow user 'guest account' to print
302
303guest ok = no
304
305writable = no
306
307printable = yes
308
309
310
311# This one is useful for people to share files
312
313;[tmp]
314
315; comment = Temporary file space
316
317; path = /tmp
318
319; read only = no
320
321; public = yes
322
323
324
325# A publicly accessible directory, but read only, except for people in
326
327# the "staff" group
328
329;[public]
330
331; comment = Public Stuff
332
333; path = /home/samba
334
335; public = yes
336
337; read only = yes
338
339; write list = @staff
340
341
342
343# Other examples.
344
345#
346
347# A private printer, usable only by fred. Spool data will be placed in fred's
348
349# home directory. Note that fred must have write access to the spool directory,
350
351# wherever it is.
352
353;[fredsprn]
354
355; comment = Fred's Printer
356
357; valid users = fred
358
359; path = /homes/fred
360
361; printer = freds_printer
362
363; public = no
364
365; writable = no
366
367; printable = yes
368
369
370
371# A private directory, usable only by fred. Note that fred requires write
372
373# access to the directory.
374
375;[fredsdir]
376
377; comment = Fred's Service
378
379; path = /usr/somewhere/private
380
381; valid users = fred
382
383; public = no
384
385; writable = yes
386
387; printable = no
388
389
390
391# a service which has a different directory for each machine that connects
392
393# this allows you to tailor configurations to incoming machines. You could
394
395# also use the %u option to tailor it by user name.
396
397# The %m gets replaced with the machine name that is connecting.
398
399;[pchome]
400
401; comment = PC Directories
402
403; path = /usr/pc/%m
404
405; public = no
406
407; writable = yes
408
409
410
411# A publicly accessible directory, read/write to all u</nt-server-name>