sabma的使用问题

由 muzi4860 在 11-28-2002 21:57 发表:

sabma的使用问题

我在系统监视器里看到smbd nmbd都已经起动了,分配了进程号,不过是睡眠状态,可是我用下面的这个命令:

/usr/bin/smbclient -L 我的地址

他总是说 xxxxxxx failed

下面是我的 smb.conf文件的内容:

[global]

workgroup = NT-Domain-Name or Workgroup-Name

workgroup = 524

server string is the equivalent of the NT Description field

server string =524 muzi 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.2. 127.0.0.1

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 = lprng

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

The argument list may include:

password server = My_PDC_Name [My_BDC_Name] [My_Next_BDC_Name]

or to auto-locate the domain controller/s

password 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  
 21encrypt passwords = yes   
 22  
 23smb passwd file = /etc/samba/smbpasswd   
 24  
 25  
 26  
 27# The following is needed to keep smbclient from spouting spurious errors   
 28  
 29# when Samba is built with support for SSL.   
 30  
 31; ssl CA certFile = /usr/share/ssl/certs/ca-bundle.crt   
 32  
 33  
 34  
 35# The following are needed to allow password changing from Windows to   
 36  
 37# update the Linux system password also.   
 38  
 39# NOTE: Use these with 'encrypt passwords' and 'smb passwd file' above.   
 40  
 41# NOTE2: You do NOT need these to allow workstations to change only   
 42  
 43# the encrypted SMB passwords. They allow the Unix password   
 44  
 45# to be kept in sync with the SMB password.   
 46  
 47unix password sync = Yes   
 48  
 49passwd program = /usr/bin/passwd %u   
 50  
 51passwd chat = *New*password* %n\n *Retype*new*password* %n\n *passwd:*all*authentication*tokens*updated*successfully*   
 52  
 53  
 54  
 55# You can use PAM's password change control flag for Samba. If   
 56  
 57# enabled, then PAM will be used for password changes when requested   
 58  
 59# by an SMB client instead of the program listed in passwd program.   
 60  
 61# It should be possible to enable this without changing your passwd   
 62  
 63# chat parameter for most setups.   
 64  
 65  
 66  
 67pam password change = yes   
 68  
 69  
 70  
 71# Unix users can map to different SMB User names   
 72  
 73; username map = /etc/samba/smbusers   
 74  
 75  
 76  
 77# Using the following line enables you to customise your configuration   
 78  
 79# on a per machine basis. The %m gets replaced with the netbios name   
 80  
 81# of the machine that is connecting   
 82  
 83include = /etc/samba/smb.conf.%m   
 84  
 85  
 86  
 87# This parameter will control whether or not Samba should obey PAM's   
 88  
 89# account and session management directives. The default behavior is   
 90  
 91# to use PAM for clear text authentication only and to ignore any   
 92  
 93# account or session management. Note that Samba always ignores PAM   
 94  
 95# for authentication in the case of encrypt passwords = yes   
 96  
 97  
 98  
 99obey pam restrictions = yes   
100  
101  
102  
103# Most people will find that this option gives better performance.   
104  
105# See speed.txt and the manual pages for details   
106  
107socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192   
108  
109  
110  
111# Configure Samba to use multiple interfaces   
112  
113# If you have multiple network interfaces then you must list them   
114  
115# here. See the man page for details.   
116  
117; interfaces = 192.168.12.2/24 192.168.13.2/24   
118  
119  
120  
121# Configure remote browse list synchronisation here   
122  
123# request announcement to, or browse list sync from:   
124  
125# a specific host or from / to a whole subnet (see below)   
126  
127; remote browse sync = 192.168.3.25 192.168.5.255   
128  
129# Cause this host to announce itself to local subnets here   
130  
131; remote announce = 192.168.1.255 192.168.2.44   
132  
133  
134  
135# Browser Control Options:   
136  
137# set local master to no if you don't want Samba to become a master   
138  
139# browser on your network. Otherwise the normal election rules apply   
140  
141local master = yes   
142  
143  
144  
145# OS Level determines the precedence of this server in master browser   
146  
147# elections. The default value should be reasonable   
148  
149os level = 65   
150  
151  
152  
153# Domain Master specifies Samba to be the Domain Master Browser. This   
154  
155# allows Samba to collate browse lists between subnets. Don't use this   
156  
157# if you already have a Windows NT domain controller doing this job   
158  
159domain master = yes   
160  
161  
162  
163# Preferred Master causes Samba to force a local browser election on startup   
164  
165# and gives it a slightly higher chance of winning the election   
166  
167preferred master = yes   
168  
169  
170  
171# Enable this if you want Samba to be a domain logon server for   
172  
173# Windows95 workstations.   
174  
175; domain logons = yes   
176  
177  
178  
179# if you enable domain logons then you may want a per-machine or   
180  
181# per user logon script   
182  
183# run a specific logon batch file per workstation (machine)   
184  
185; logon script = %m.bat   
186  
187# run a specific logon batch file per username   
188  
189; logon script = %U.bat   
190  
191  
192  
193# Where to store roving profiles (only for Win95 and WinNT)   
194  
195# %L substitutes for this servers netbios name, %U is username   
196  
197# You must uncomment the [Profiles] share below   
198  
199; logon path = \\\%L\Profiles\%U   
200  
201  
202  
203# Windows Internet Name Serving Support Section:   
204  
205# WINS Support - Tells the NMBD component of Samba to enable it's WINS Server   
206  
207; wins support = yes   
208  
209  
210  
211# WINS Server - Tells the NMBD components of Samba to be a WINS Client   
212  
213# Note: Samba can be either a WINS Server, or a WINS Client, but NOT both   
214  
215; wins server = w.x.y.z   
216  
217  
218  
219# WINS Proxy - Tells Samba to answer name resolution queries on   
220  
221# behalf of a non WINS capable client, for this to work there must be   
222  
223# at least one WINS Server on the network. The default is NO.   
224  
225; wins proxy = yes   
226  
227  
228  
229# DNS Proxy - tells Samba whether or not to try to resolve NetBIOS names   
230  
231# via DNS nslookups. The built-in default for versions 1.9.17 is yes,   
232  
233# this has been changed in version 1.9.18 to no.   
234  
235dns proxy = no   
236  
237  
238  
239# Case Preservation can be handy - system default is _no_   
240  
241# NOTE: These can be set on a per share basis   
242  
243; preserve case = no   
244  
245; short preserve case = no   
246  
247# Default case is normally upper case for all DOS files   
248  
249; default case = lower   
250  
251# Be very careful with case sensitivity - it can break things!   
252  
253; case sensitive = no   
254  
255  
256  
257#============================ Share Definitions ==============================   
258  
259[homes]   
260  
261comment = Home Directories   
262  
263browseable = no   
264  
265writable = yes   
266  
267valid users = %S   
268  
269create mode = 0664   
270  
271directory mode = 0775   
272  
273# If you want users samba doesn't recognize to be mapped to a guest user   
274  
275; map to guest = bad user   
276  
277  
278  
279  
280  
281# Un-comment the following and create the netlogon directory for Domain Logons   
282  
283; [netlogon]   
284  
285; comment = Network Logon Service   
286  
287; path = /usr/local/samba/lib/netlogon   
288  
289; guest ok = yes   
290  
291; writable = no   
292  
293; share modes = no   
294  
295  
296  
297  
298  
299# Un-comment the following to provide a specific roving profile share   
300  
301# the default is to use the user's home directory   
302  
303;[Profiles]   
304  
305; path = /usr/local/samba/profiles   
306  
307; browseable = no   
308  
309; guest ok = yes   
310  
311  
312  
313  
314  
315# NOTE: If you have a BSD-style print system there is no need to   
316  
317# specifically define each individual printer   
318  
319#[printers]   
320  
321# comment = All Printers   
322  
323# path = /var/spool/samba   
324  
325# browseable = no   
326  
327# Set public = yes to allow user 'guest account' to print   
328  
329guest ok = yes   
330  
331writable = no   
332  
333printable = yes   
334  
335  
336  
337# This one is useful for people to share files   
338  
339[tmp]   
340  
341comment = Temporary file space   
342  
343path = /tmp   
344  
345read only = no   
346  
347public = yes   
348  
349  
350  
351# A publicly accessible directory, but read only, except for people in   
352  
353# the "staff" group   
354  
355[public]   
356  
357comment = Public Stuff   
358  
359path = /home/samba   
360  
361public = yes   
362  
363writable = yes   
364  
365printable = no   
366  
367write list = @staff   
368  
369  
370  
371# Other examples.   
372  
373#   
374  
375# A private printer, usable only by fred. Spool data will be placed in fred's   
376  
377# home directory. Note that fred must have write access to the spool directory,   
378  
379# wherever it is.   
380  
381[fredsprn]   
382  
383comment = Fred's Printer   
384  
385valid users = fred   
386  
387path = /home/fred   
388  
389printer = freds_printer   
390  
391public = no   
392  
393writable = no   
394  
395printable = yes   
396  
397  
398  
399# A private directory, usable only by fred. Note that fred requires write   
400  
401# access to the directory.   
402  
403[fredsdir]   
404  
405comment = Fred's Service   
406  
407path = /usr/somewhere/private   
408  
409valid users = fred   
410  
411public = no   
412  
413writable = yes   
414  
415printable = no   
416  
417  
418  
419# a service which has a different directory for each machine that connects   
420  
421# this allows you to tailor configurations to incoming machines. You could   
422  
423# also use the %U option to tailor it by user name.   
424  
425# The %m gets replaced with the machine name that is connecting.   
426  
427[pchome]   
428  
429comment = PC Directories   
430  
431path = /usr/local/pc/%m   
432  
433public = no   
434  
435writable = yes   
436  
437  
438  
439# A publicly accessible directory, read/write to all users. Note that all files   
440  
441# created in the directory by users will be owned by the default user, so   
442  
443# any user with access can delete any other user's files. Obviously this   
444  
445# directory must be writable by the default user. Another user could of course   
446  
447# be specified, in which case all files would be owned by that user instead.   
448  
449[public]   
450  
451path = /usr/somewhere/else/public   
452  
453public = yes   
454  
455only guest = yes   
456  
457writable = yes   
458  
459printable = no   
460  
461  
462  
463# The following two entries demonstrate how to share a directory so that two   
464  
465# users can place files there that will be owned by the specific users. In this   
466  
467# setup, the directory should be writable by both users and should have the   
468  
469# sticky bit set on it to prevent abuse. Obviously this could be extended to   
470  
471# as many users as required.   
472  
473[myshare]   
474  
475comment = Mary's and Fred's stuff   
476  
477path = /usr/somewhere/shared   
478  
479valid users = mary fred   
480  
481public = no   
482  
483writable = yes   
484  
485printable = no   
486  
487create mask = 0765   
488  
489请大家指点一下。 
490
491  
492
493
494* * *
495
496  
497_由 solaris 在 11-28-2002 23:30 发表:_   
498  
499
500
501****
502
503  
504  
505
506
507出错提示是什么? 
508
509  
510
511
512* * *
513
514  
515_由 muzi4860 在 11-29-2002 11:02 发表:_   
516  
517
518
519****
520
521  
522  
523
524
525我刚才直接用了:   
526  
527#/etc/rc.d/init.d/smb start 手动启动 smaba   
528  
529他在下面显示两行的乱码,后面的[]里面是绿色的   
530  
531我想应该是启动了吧,然后我又输入下面的命令:   
532  
533/usr/bin/smbclient -L SMBserver   
534  
535他输出了下面的信息,   
536  
537add interface ip=192.168.3.203 bcast=192.168.3.255 nmask=255.255.255.0   
538  
539connection to SMBserver failed   
540  
541这是不是因为我没有把SMBserver换成我的ip的缘故啊。   
542  
543  
544  
545**************   
546  
547我刚才按照你说的把SMBserver换成了我的ip地址,结果输出如下:   
548  
549session request to 192.168.3.203 failed(not listening for calling name)   
550  
551session request to 192 failed(not listening for calling name)   
552  
553session request to *SMBSERVER failed(not listening for calling name)   
554  
555这又是哪里的问题啊,在线等待!!! 
556
557  
558
559
560* * *
561
562  
563_由 solaris 在 11-29-2002 12:55 发表:_   
564  
565
566
567****
568
569  
570  
571
572
5731\. smbclient -L hostname &lt;-U username&gt; 说明:列出指定主机的共享资源。   
574  
5752\. smbclient \\\\\\\server\\\共享名 &lt;-U username&gt; 说明:连接网络共享资源。其用法类似ftp。   
576  
5773\. smbmount \\\\\\\server\\\共享名 -c 'mount /mnt/smb' 说明:安装指定主机的共享名到本地 
578
579  
580
581
582* * *
583
584  
585_由 muzi4860 在 11-29-2002 13:28 发表:_   
586  
587
588
589****
590
591  
592  
593
594
595我刚才直接用了:   
596  
597#/etc/rc.d/init.d/smb start 手动启动 smaba   
598  
599他在下面显示两行的乱码,后面的[]里面是绿色的   
600  
601我想应该是启动了吧,然后我又输入下面的命令:   
602  
603/usr/bin/smbclient -L SMBserver   
604  
605他输出了下面的信息,   
606  
607add interface ip=192.168.3.203 bcast=192.168.3.255 nmask=255.255.255.0   
608  
609connection to SMBserver failed   
610  
611这是不是因为我没有把SMBserver换成我的ip的缘故啊。   
612  
613  
614  
615**************   
616  
617我刚才按照你说的把SMBserver换成了我的ip地址,结果输出如下:   
618  
619session request to 192.168.3.203 failed(not listening for calling name)   
620  
621session request to 192 failed(not listening for calling name)   
622  
623session request to *SMBSERVER failed(not listening for calling name)   
624  
625这又是哪里的问题啊,在线等待!!! 
626
627  
628
629
630* * *
631
632  
633_由 muzi4860 在 11-29-2002 13:29 发表:_   
634  
635
636
637****
638
639  
640  
641
642
643我刚才按照你说的把SMBserver换成了我的ip地址,结果输出如下:   
644  
645session request to 192.168.3.203 failed(not listening for calling name)   
646  
647session request to 192 failed(not listening for calling name)   
648  
649session request to *SMBSERVER failed(not listening for calling name)   
650  
651这又是哪里的问题啊,在线等待!!! 
652
653  
654
655
656* * *
657
658  
659_由 muzi4860 在 11-29-2002 16:24 发表:_   
660  
661
662
663****
664
665  
666  
667
668
669大家过来帮帮忙!!! 
670
671  
672
673
674* * *
675
676  
677_由 muzi4860 在 11-29-2002 18:21 发表:_   
678  
679
680
681****
682
683  
684  
685
686
687帮帮忙好不好啊 
688
689  
690
691
692* * *
693
694  
695_由 solaris 在 11-29-2002 18:28 发表:_   
696  
697
698
699****
700
701  
702  
703
704
705把/var/log/samba目录里的log文件内容贴出来,最后若干行就行。 
706
707  
708
709
710* * *
711
712  
713_由 muzi4860 在 11-29-2002 21:30 发表:_   
714  
715
716
717****
718
719  
720  
721
722
723我的log.nmbd:   
724  
725[2002/11/26 22:12:59, 0] nmbd/nmbd.c:main(794)   
726  
727Netbios nameserver version 2.2.5 started.   
728  
729Copyright Andrew Tridgell and the Samba Team 1994-2002   
730  
731[2002/11/26 22:15:38, 0] nmbd/nmbd.c:terminate(59)   
732  
733Got SIGTERM: going down...   
734  
735[2002/11/26 22:27:21, 0] nmbd/nmbd.c:main(794)   
736  
737Netbios nameserver version 2.2.5 started.   
738  
739Copyright Andrew Tridgell and the Samba Team 1994-2002   
740  
741[2002/11/26 22:29:08, 0] nmbd/nmbd.c:terminate(59)   
742  
743Got SIGTERM: going down...   
744  
745[2002/11/27 20:55:18, 0] nmbd/nmbd.c:main(794)   
746  
747Netbios nameserver version 2.2.5 started.   
748  
749Copyright Andrew Tridgell and the Samba Team 1994-2002   
750  
751[2002/11/27 21:01:07, 0] nmbd/nmbd_become_lmb.c:become_local_master_stage2(404)   
752  
753*****   
754  
755  
756  
757Samba name server MUZI is now a local master browser for workgroup 524 on subnet 192.168.3.203   
758  
759  
760  
761*****   
762  
763[2002/11/27 21:21:24, 0] nmbd/nmbd.c:terminate(59)   
764  
765Got SIGTERM: going down...   
766  
767[2002/11/28 15:40:23, 0] nmbd/nmbd.c:main(794)   
768  
769Netbios nameserver version 2.2.5 started.   
770  
771Copyright Andrew Tridgell and the Samba Team 1994-2002   
772  
773[2002/11/28 15:46:12, 0] nmbd/nmbd_become_lmb.c:become_local_master_stage2(404)   
774  
775*****   
776  
777  
778  
779Samba name server MUZI is now a local master browser for workgroup 524 on subnet 192.168.3.203   
780  
781  
782  
783*****   
784  
785[2002/11/28 16:29:15, 0] nmbd/nmbd.c:terminate(59)   
786  
787Got SIGTERM: going down...   
788  
789[2002/11/28 21:02:10, 0] nmbd/nmbd.c:main(794)   
790  
791Netbios nameserver version 2.2.5 started.   
792  
793Copyright Andrew Tridgell and the Samba Team 1994-2002   
794  
795[2002/11/28 21:08:00, 0] nmbd/nmbd_become_lmb.c:become_local_master_stage2(404)   
796  
797*****   
798  
799  
800  
801Samba name server MUZI is now a local master browser for workgroup 524 on subnet 192.168.3.203   
802  
803  
804  
805*****   
806  
807[2002/11/28 21:16:35, 0] nmbd/nmbd.c:main(794)   
808  
809Netbios nameserver version 2.2.5 started.   
810  
811Copyright Andrew Tridgell and the Samba Team 1994-2002   
812  
813[2002/11/28 21:16:35, 0] lib/pidfile.c:pidfile_create(86)   
814  
815ERROR: nmbd is already running. File /var/run/samba/nmbd.pid exists and process id 654 is running.   
816  
817[2002/11/28 21:17:36, 0] nmbd/nmbd.c:main(794)   
818  
819Netbios nameserver version 2.2.5 started.   
820  
821Copyright Andrew Tridgell and the Samba Team 1994-2002   
822  
823[2002/11/28 21:17:36, 0] lib/pidfile.c:pidfile_create(86)   
824  
825ERROR: nmbd is already running. File /var/run/samba/nmbd.pid exists and process id 654 is running.   
826  
827[2002/11/28 21:20:10, 0] nmbd/nmbd.c:main(794)   
828  
829Netbios nameserver version 2.2.5 started.   
830  
831Copyright Andrew Tridgell and the Samba Team 1994-2002   
832  
833[2002/11/28 21:20:10, 0] lib/pidfile.c:pidfile_create(86)   
834  
835ERROR: nmbd is already running. File /var/run/samba/nmbd.pid exists and pro</nt-server-name>
Published At
Categories with 服务器类
Tagged with
comments powered by Disqus