由 e_jacky 在 10-29-2002 21:53 发表:
在linux下如何用samba访问windows上的内容?
我配置好了samba之后,在windows里可以访问linux里面的内容。但在linux上不可以访windows里面的内容
用smbclient -L hostname命令后提示要密码,但输入之后也不行
我该怎么办啊?
谢谢!!!
由 mado115 在 10-29-2002 22:08 发表:
我是一个菜鸟,你能告诉我你是怎么做的吗?
或者那儿有这个方面的教程》??
谢了!
我--就是firekylin!
欢迎热爱计算机系统,网络,linux的朋友在一起讨论问题!
座右铭:万事开头难,只怕有心人!QQ:34959630
电脑配置:ATI RADEON 7000 AMD Athlon XP 1600+ VT266A
金邦DDR 256 40G CMI 8738
由 e_jacky 在 10-29-2002 22:09 发表:
你是指在windows下如何访问linux的内容吗?
由 finux 在 10-30-2002 13:14 发表:
在/mnt下建个目录tmp,在windows里将要访问的目录设为共享,如D盘,
在linux里用命令“smbmount //hostname/d /mnt/tmp”,要求密码时直接回车。这样,在/mnt/tmp里就可看到windows的D盘内容。
月光光,秀才娘;骑白马,过莲塘...
由 e_jacky 在 10-31-2002 19:15 发表:
兄弟,我试过了,不行啊,还有什么方法啊?
或者是smb.conf文件还没设置好啊?
由 finux 在 10-31-2002 23:27 发表:
不会吧,我一直都是这么用的,这里也说不清,把你的smb.conf文件贴上来看看。
或你发mail给我:[email protected]
月光光,秀才娘;骑白马,过莲塘...
由 e_jacky 在 11-01-2002 08:27 发表:
好的,兄弟麻烦你了:
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 many any basic syntactic errors.
#======================= Global Settings =====================================
[global]
workgroup = NT-Domain-Name or Workgroup-Name
workgroup = 9911
netbios name = 991141
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/log.%m
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/smbpasswd
24
25
26
27# The following are needed to allow password changing from Windows to
28
29# update the Linux sytsem 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/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/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# Use only if you have an NT server on your network that has been
132
133# configured at install time to be a primary domain controller.
134
135; domain controller = <nt-domain-controller-smbname>
136
137
138
139# Enable this if you want Samba to be a domain logon server for
140
141# Windows95 workstations.
142
143; domain logons = yes
144
145
146
147# if you enable domain logons then you may want a per-machine or
148
149# per user logon script
150
151# run a specific logon batch file per workstation (machine)
152
153; logon script = %m.bat
154
155# run a specific logon batch file per username
156
157; logon script = %U.bat
158
159
160
161# Where to store roving profiles (only for Win95 and WinNT)
162
163# %L substitutes for this servers netbios name, %U is username
164
165# You must uncomment the [Profiles] share below
166
167; logon path = \\\%L\Profiles\%U
168
169
170
171# All NetBIOS names must be resolved to IP Addresses
172
173# 'Name Resolve Order' allows the named resolution mechanism to be specified
174
175# the default order is "host lmhosts wins bcast". "host" means use the unix
176
177# system gethostbyname() function call that will use either /etc/hosts OR
178
179# DNS or NIS depending on the settings of /etc/host.config, /etc/nsswitch.conf
180
181# and the /etc/resolv.conf file. "host" therefore is system configuration
182
183# dependant. This parameter is most often of use to prevent DNS lookups
184
185# in order to resolve NetBIOS names to IP Addresses. Use with care!
186
187# The example below excludes use of name resolution for machines that are NOT
188
189# on the local network segment
190
191# - OR - are not deliberately to be known via lmhosts or via WINS.
192
193; name resolve order = wins lmhosts bcast
194
195
196
197# Windows Internet Name Serving Support Section:
198
199# WINS Support - Tells the NMBD component of Samba to enable it's WINS Server
200
201; wins support = yes
202
203
204
205# WINS Server - Tells the NMBD components of Samba to be a WINS Client
206
207# Note: Samba can be either a WINS Server, or a WINS Client, but NOT both
208
209; wins server = w.x.y.z
210
211
212
213# WINS Proxy - Tells Samba to answer name resolution queries on
214
215# behalf of a non WINS capable client, for this to work there must be
216
217# at least one WINS Server on the network. The default is NO.
218
219; wins proxy = yes
220
221
222
223# DNS Proxy - tells Samba whether or not to try to resolve NetBIOS names
224
225# via DNS nslookups. The built-in default for versions 1.9.17 is yes,
226
227# this has been changed in version 1.9.18 to no.
228
229dns proxy = no
230
231
232
233# Case Preservation can be handy - system default is _no_
234
235# NOTE: These can be set on a per share basis
236
237; preserve case = no
238
239; short preserve case = no
240
241# Default case is normally upper case for all DOS files
242
243; default case = lower
244
245# Be very careful with case sensitivity - it can break things!
246
247; case sensitive = no
248
249
250
251#============================ Share Definitions ==============================
252
253[homes]
254
255comment = Home Directories
256
257browseable = no
258
259writable = yes
260
261
262
263# Un-comment the following and create the netlogon directory for Domain Logons
264
265; [netlogon]
266
267; comment = Network Logon Service
268
269; path = /home/netlogon
270
271; guest ok = yes
272
273; writable = no
274
275; share modes = no
276
277
278
279
280
281# Un-comment the following to provide a specific roving profile share
282
283# the default is to use the user's home directory
284
285;[Profiles]
286
287; path = /home/profiles
288
289; browseable = no
290
291; guest ok = yes
292
293
294
295
296
297# NOTE: If you have a BSD-style print system there is no need to
298
299# specifically define each individual printer
300
301[printers]
302
303comment = All Printers
304
305path = /var/spool/samba
306
307browseable = no
308
309# Set public = yes to allow user 'guest account' to print
310
311guest ok =yes
312
313writable = no
314
315printable = yes
316
317
318
319# This one is useful for people to share files
320
321;[tmp]
322
323; comment = Temporary file space
324
325; path = /tmp
326
327; read only = no
328
329; public = yes
330
331
332
333# A publicly accessible directory, but read only, except for people in
334
335# the "staff" group
336
337[public]
338
339; comment = Public Stuff
340
341path = /
342
343public = yes
344
345; writable = yes
346
347; printable = no
348
349; write list = @staff
350
351
352
353# Other examples.
354
355#
356
357# A private printer, usable only by fred. Spool data will be placed in fred's
358
359# home directo</nt-domain-controller-smbname></nt-server-name>