Chinaunix首页 | 论坛 | 博客
  • 博客访问: 812188
  • 博文数量: 770
  • 博客积分: 5000
  • 博客等级: 大校
  • 技术积分: 4950
  • 用 户 组: 普通用户
  • 注册时间: 2008-10-09 17:49
文章分类

全部博文(770)

文章存档

2011年(1)

2008年(769)

我的朋友

分类:

2008-10-10 11:06:13

我在虚拟机上安装了redhat9并安装启用了samba服务,在没有接入网络时我使用smbclient -L 127.0.0.1测试,可以看到共享文件。但当
接入网络后,使用自已的IP,smbclient -L 192.168.1.102时出现:
[root@server root]# smbclient -L 192.168.1.102
added interface ip=192.168.1.102 bcast=192.168.1.255 nmask=255.255.255.0
session request to 192.168.1.102 failed (Call returned zero bytes (EOF)
)
session request to 192 failed (Call returned zero bytes (EOF)
)
session request to *SMBSERVER failed (Call returned zero bytes (EOF)
我原以为是Linux系统的防火墙堵住了,就把防火墙关了,并在/etc/hosts.allow中加 all:192.168.1.0/255.255.255.0
smbd:192.168.1.0/255.255.255.0
但结果还是一样。可以PING通外网。和本地网。      
--------------------next---------------------
这个是/etc/samba/smb.conf
[global]
# workgroup = NT-Domain-Name or Workgroup-Name
   workgroup = MYGROUP
# server string is the equivalent of the NT Description field
   server string = Samba Server
;   hosts allow = 192.168.1. 192.168.2. 127.
   printcap name = /etc/printcap
   load printers = yes
   printing = cups
;  guest account = pcguest
   log file = /var/log/samba/%m.log
   max log size = 0
   security = user
;   password server =
;  password level = 8
;  username level = 8
   encrypt passwords = yes
   smb passwd file = /etc/samba/smbpasswd
;   ssl CA certFile = /usr/share/ssl/certs/ca-bundle.crt
   unix password sync = Yes
   passwd program = /usr/bin/passwd %u
   passwd chat = *New*password* %n\n *Retype*new*password* %n\n

*passwd:*all*authentication*tokens*updated*successfully*
   pam password change = yes
;  username map = /etc/samba/smbusers
;   include = /etc/samba/smb.conf.%m
  obey pam restrictions = yes
   socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
;   interfaces = 192.168.12.2/24 192.168.13.2/24
;   remote browse sync = 192.168.3.25 192.168.5.255
;   remote announce = 192.168.1.255 192.168.2.44
;   local master = no
;   os level = 33
;   domain master = yes
;   preferred master = yes
;   domain logons = yes
;   logon script = %m.bat
;   logon script = %U.bat
;   logon path = \\%L\Profiles\%U
;   wins support = yes
;   wins server = w.x.y.z
;   wins proxy = yes
   dns proxy = no
;  preserve case = no
;  short preserve case = no
;  default case = lower
;  case sensitive = no

#============================ Share Definitions ==============================
[homes]
   comment = Home Directories
   browseable = no
   writable = yes
   valid users = %S
   create mode = 0664
   directory mode = 0775

[printers]
   comment = All Printers
   path = /var/spool/samba
   browseable = no
# Set public = yes to allow user 'guest account' to print
   guest ok = no
   writable = no
   printable = yes

[docs]
    commet = this is a network desk
    path = /opt/network
    public = yes      
--------------------next---------------------

阅读(407) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~