Budyanto Himawan wrote:
> I have set up samba on linux and I'am able to share
> linux directories with my windows xp. I can also
> ping the linux server from then windows xp but I can't
> do the reverse. I can't ping xp from linux by name.
>
> I have set up xp to use the ip of the linux server for
> its WINS server.
>
> smb.conf is set with the following:
> wins support = yes
> wins proxy = yes
>
> >From what I've read this should be sufficient to be
> able to let linux ping netbios names. Since that
> doesn't work I've also tried populating lmhosts with
> ip and netbios name of xp and pass it with -H arg to
> nmbd.
Ordinarily, NetBIOS names are used only by Samba and related tools, which
ping is not. Thus, registering the NetBIOS name of the XP box won't let
you address it by name from Linux. In most cases, you can get it working
by adding "wins" to the list of name-resolution methods on the "hosts"
line in /etc/nsswitch.conf. Chances are this line looks like the
following right now:
hosts: files nisplus nis dns
Try changing it to read as follows:
hosts: files nisplus nis dns wins
What this does is to tell Linux to use NetBIOS name resolution ("wins")
after all other resolution methods ("file" for /etc/hosts, "nisplus" and
"nis" for NIS+ and NIS, and "dns" for DNS). If I understand correctly,
"wins" is actually a bit of a misnomer because a WINS server isn't
actually required (it'll work off of broadcasts). I haven't looked into
this in great depth, though. My guess is it takes some data from the
smb.conf file, like the workgroup name.
Other approaches to resolving this problem include adding the name and
static IP address of the XP box to your local DNS server, adding the name
and static IP address of the XP box to your Linux system's /etc/hosts
file, and using the Samba "wins hook" parameter to link Samba with your
DNS server to dynamically update the DNS server with NetBIOS names. (This
last option is ugly and tedious to set up.)
--
Rod Smith,
(E-Mail Removed)
http://www.rodsbooks.com
Author of books on Linux, FreeBSD, and networking