Samba related question.

p.lussier at comcast.net p.lussier at comcast.net
Thu Feb 12 23:43:09 EST 2004


In a message dated: Wed, 11 Feb 2004 12:21:36 EST
Ed Lawson said:

>That would be the rational way, but this person has zero experience with
>Linux and telling him, "OK, now we are going to set up a DNS" might put
>him over the edge.  OTOH, I suspect we could spend no small amount of
>time klutzing around with half baked solutions.

Agreed.  You want to set up Samba as a WINS server.  It's the easiest 
and simplest solution.  Both expedient in the near term, and the 
least time consuming or troubling to maintain long term.

>I would like to know how the Windows boxes on my network know the name of my
>Linux box running Samba with no DNS or host files beyond the one on the router.

One of your systems is acting as a WINS server.  Samba likely has, at 
the very least, a 'netbios name' statement and possibly even a 
'workgroup' statement which is the same on all your Windows boxes.
(the deault 'workgroup' for both Windows and Samba is 'WORKGROUP' 
usually).

I believe by default, Samba will, if the config file does not contain
a 'netbios name' statement, use the system's hostname as it's 'netbios
name' and broadcast that the local network.  As a result, whichever
system is the WINS server will notice that system and announce it to
all clients which register with it.  There is *always* a WINS server
on a network unless you explicitly tell all Windows systems not to try
to be one(actually, I'm not even sure you can do that!).  There's a
whole election system built into the protocol such that the one most
"qualified" to be the server "WINS" (pun intended :) the election.

So, that's how your Windows systems know the name of your Linux/Samba 
system.

>I just ran a test and it isn't getting that info via DHCP.  One of the
>windows boxes is a dual boot machine when booted under Linux it cannot
>ping the Samba server by name, but can when booted under Windows.

This is likely because when booted under Linux, there's no entry in 
your local /etc/hosts file for the Samba system.  Plug an entry in 
the /etc/hosts system, and voila, you can ping the Samba system
(Look Ma, no reboot either :)

You should be able to ping the Samba server via IP address though, 
unless you numbered your network somewhat randomly and all hosts have 
different network assignments.

If you're at all interested in understanding Windows networking more 
fully, I highly recommend the very first Samba book by John Blair.
It's rather outdated, referring to Samba 1.x, but the first 3 
chapters or so are an in-depth explanation to the twisted and 
contorted world of Windows Network protocols.  I've yet to see 
another Samba book provide anywhere near as good an explanation of 
how this stuff works, and I think I've read them all :)
-- 

Seeya,
Paul
--
Key fingerprint = 1660 FECC 5D21 D286 F853  E808 BB07 9239 53F1 28EE

	It may look like I'm just sitting here doing nothing,
   but I'm really actively waiting for all my problems to go away.

	 If you're not having fun, you're not doing it right!





More information about the gnhlug-discuss mailing list