又有问题:不能联网???

由 fly8000 在 06-23-2004 11:51 发表:

又有问题:不能联网???

机器互联:WINXP+WINXP+LINUX9.0

winxp:名称:GM04,内网IP:169.254.100.45

winxp:名称:GM04,内网IP:169.254.100.X

LINUX:名称:localhost,内网IP:127.0.0.1

配置SAMBA后:

[root@localhost root]# smbclient -L 169.254.100.49

timeout connecting to 169.254.100.49:139

Error connecting to 169.254.100.49 (Operation already in progress)

Connection to 169.254.100.49 failed

[root@localhost root]# smbclient -L //GM05

Connection to GM05 failed

我的文件如下:青帮忙

Samba config file created using SWAT

from localhost.localdomain (127.0.0.1)

Date: 2004/06/23 11:28:50

Global parameters

[global]

client code page = 936

workgroup = MSHOME

netbios name = LOCALHOST

server string = Samba Server

security = SHARE

obey pam restrictions = Yes

pam password change = Yes

passwd program = /usr/bin/passwd %u

passwd chat = Newpassword* %n\n Retypenewpassword %n\n passwd:allauthenticationtokensupdatedsuccessfully*

unix password sync = Yes

log file = /var/log/samba/%m.log

max log size = 0

socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192

dns proxy = No

hosts allow = 169.254.100.1 169.254.100.127

printing = cups

[homes]

comment = Home Directories

valid users = %S

read only = No

create mask = 0664

directory mask = 0775

browseable = No

[printers]

comment = All Printers

path = /var/spool/samba

printable = Yes

browseable = No

[public]

comment = Public Stuff

path = /home/eastowen

write list = @staff

read only = No

guest ok = Yes

[GM04]

comment = GM04

path = /home/GM04

username = GM04

valid users = GM04

read only = No

guest ok = Yes

[GM05]

comment = GM05

path = /home/GM05

username = GM05

valid users = GM05

guest ok = Yes

[share]

comment = win and linux share

path = /share

read only = No

guest ok = Yes


由 smile787 在 06-23-2004 12:06 发表:


LINUX:名称:localhost,内网IP:127.0.0.1

这个是主机循环地址。。

该为内网IP:169.254.100.X试试


由 fly8000 在 06-23-2004 14:13 发表:


我的IP改为169.254.100.51,问题解决!谢谢

还有问题请教SMILE787:

如何查询自己主机名,如何更改名字?(我的名字是默认的)


由 smile787 在 06-23-2004 17:07 发表:


workgroup = MSHOME

netbios name = LOCALHOST

这是组和你的主机名。。。改来试试。。。不行我们再讨论


由 fly8000 在 06-24-2004 09:22 发表:


我把IP改为169.254.100.51,问题已解决!谢谢

我可以访问WINXP机器,但WINXP却不能查到我,怎么办?如何操作?

还有如何查询自己主机名,我的主机名是默认的,如何更改主机名?


由 smile787 在 06-24-2004 09:50 发表:


还有如何查询自己主机名,我的主机名是默认的,如何更改主机名?

Global parameters

[global]

workgroup = MSHOME(改为你的工作组,如office)

netbios name = LOCALHOST(改为你要的主机名,如smile)

还有一个地方改主机名,在/etc目录下,是rc.conf还是host的什么你就要看看了。。。这个地方通常不用改!

对于你说的要查询我要么用监听的方法看网络的主机,要么就直接用smb;///找了。。。

但WINXP却不能查到我,怎么办?如何操作?

请问有没打开139端口呢?或者看看防火墙是否关闭!


由 fly8000 在 06-24-2004 10:39 发表:


谢谢smile787大哥!

我的意思是:就象在WINDOWS下改主机名,如:

系统-网络标示-属性-计算机名进行更改主机名

linux下如何改?

169.254.100.55是我的IP地址:

NATSTAT -NA

169.254.100.55:139 0.0.0.0:0

169.254.100.55:137 :

169.254.100.55:138 :

。。。。。。。。。。

我应该打开了139端口吧!

在WINXP查找计算机LOCALHOST找不到!

???


由 孙康 在 06-24-2004 12:45 发表:


> quote: > > * * * > > 最初由 fly8000 发表
>
> **谢谢smile787大哥!
>
> 我的意思是:就象在WINDOWS下改主机名,如:
>
> 系统-网络标示-属性-计算机名进行更改主机名
>
>
>
> linux下如何改?
>
>
>
> 169.254.100.55是我的IP地址:
>
> NATSTAT -NA
>
> 169.254.100.55:139 0.0.0.0:0
>
> 169.254.100.55:137 :
>
> 169.254.100.55:138 :
>
> 。。。。。。。。。。
>
>
>
> 我应该打开了139端口吧!
>
>
>
> 在WINXP查找计算机LOCALHOST找不到!
>
>
>
> ??? ** > > * * *

localhost 是reserved words, 统指127.0.0.1,试在samba中的bios name作修改后就可以了。由于WinXP是使用samba作联系,使用bios name作辨识。所以在内网中,bios name就是你的主机名。

另由于NetBios拥有一个内在缺陷,如果你的内网中没有设置wins server,最好在smb.conf中把这台linux主机设置成domain master,这样一来XP就可以轻易的在网络邻居中找得到你了。设置如下:

> > 源码: >
> * * * >
> ...
> > > ...
> > > # local master = no
> > >
> > > # OS Level determines the precedence of this server in master browser
> > > # elections. The default value should be reasonable
> > > os level = 33
> > >
> > > # Domain Master specifies Samba to be the Domain Master Browser. This
> > > # allows Samba to collate browse lists between subnets. Don't use this
> > > # if you already have a Windows NT domain controller doing this job
> > > domain master = yes
> > >
> > > # Preferred Master causes Samba to force a local browser election on startup
> > > # and gives it a slightly higher chance of winning the election
> > > preferred master = yes
> > >
> > > browse list = yes
> > >
> > > # 7. Name Resolution Options:
> > > # All NetBIOS names must be resolved to IP Addresses
> > > # 'Name Resolve Order' allows the named resolution mechanism to be specified
> > > # the default order is "host lmhosts wins bcast". "host" means use the unix
> > > # system gethostbyname() function call that will use either /etc/hosts OR
> > > # DNS or NIS depending on the settings of /etc/host.config, /etc/nsswitch.conf
> > > # and the /etc/resolv.conf file. "host" therefore is system configuration
> > > # dependant. This parameter is most often of use to prevent DNS lookups
> > > # in order to resolve NetBIOS names to IP Addresses. Use with care!
> > > # The example below excludes use of name resolution for machines that are NOT
> > > # on the local network segment
> > > # - OR - are not deliberately to be known via lmhosts or via WINS.
> > > name resolve order = wins lmhosts bcast
> > >
> > > # Windows Internet Name Serving Support Section:
> > > # WINS Support - Tells the NMBD component of Samba to enable it's WINS Server
> > > wins support = yes
> > > ...
> > > ... >
> * * *


由 smile787 在 06-24-2004 13:26 发表:


我的意思是:就象在WINDOWS下改主机名,如:

系统-网络标示-属性-计算机名进行更改主机名

这种改法我在红旗4里看到有。它也是通过文件该这个配置文件。。

你做了后,在文件管理器里输入smb;///就可以找到你的计算机。


由 fly8000 在 06-25-2004 13:27 发表:


"# Global parameters

[global]

workgroup = MSHOME(改为你的工作组,如office)

netbios name = LOCALHOST(改为你要的主机名,如smile)"

这样改的名字只是用来在WINXP网络邻居中显示的名字,而真正主机机名没改,如:

root@localhost root

我的主机名还是localhost,不知怎么办?

孙康:我在smb.conf中怎么找不到和你相似的语句,添加不了,请帮忙。

我现在还是可以访问WINXP机器,但WINXP却不能查到我,

smb.conf全文如下:

Samba config file created using SWAT

from localhost.localdomain (127.0.0.1)

Date: 2004/06/23 14:16:56

Global parameters

[global]

client code page = 936

workgroup = MSHOME

netbios name = linux

server string = Samba Server

security = SHARE

obey pam restrictions = Yes

pam password change = Yes

passwd program = /usr/bin/passwd %u

passwd chat = Newpassword* %n\n Retypenewpassword %n\n passwd:allauthenticationtokensupdatedsuccessfully*

unix password sync = Yes

log file = /var/log/samba/%m.log

max log size = 0

socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192

dns proxy = No

hosts allow = 169.254.100.1 169.254.100.127

printing = cups

[homes]

comment = Home Directories

valid users = %S

read

Published At
Categories with 服务器类
Tagged with
comments powered by Disqus