Solution to my own problem (hacked together) use if looks good to

Dan Kaminsky effugas at
Mon Jan 25 00:48:01 GMT 1999

>> Samba shouldn't touch the /etc/hosts file.  Period.  Not its domain.
>that's right. Samba doesn't touch the /etc/hosts file, all it does is
>call gethostbyname() and gethostbyaddr() which might or might not
>consult /etc/hosts depending on your local setup (set in /etc/nsswitch.conf
>on several OSes)

The problem occurs when the local IP changes, because of a dhcpcd update.
My assumption is that once an IP is decided, it sticks around.

>the ugliest bit of the code dealing with interfaces in Samba is the
>code that has to try to work out the netmask (and thus broadcast)
>addresses of the interfaces it is using. It needs those but there is
>no standard API for finding them. So we have some really ugly code
>that does stuff on raw sockets in a quite OS dependent fashion. Now
>that we have autoconf this works on quite a wide range of OSes but
>certainly not all.

I'm kinda confused--last I checked, we were forced to give the netmask in
the interface.

interfaces =

That's what I'm running, for example, for the Linux machine in the middle of
the Proxy ARP Subnet I have setup here.  (Proxy ARP, by the way, works
wonderfully except that I haven't yet found a way to allow the machines on
the 194 subnet to share broadcasts with computers on the 98 subnet.  That
means no network neighborhood for the 194 machines.  Any suggestions?)

Does what you refer to happen if you neglect to write the subnet?

>Several people have suggested lots of nice changes to the way that the
>interfaces setup is presented in smb.conf but I generally ignore such
>requests unless they come with an explanation on how to implement the
>new method portably (or at least as portably as the current code). For
>example, methods that use the symbolic names of interfaces (like
>"eth0") need to say how we are going to find out what the symbolic
>name is configured as on HPUX, Solaris, IRIX, Linux, OSF1, Unicos,
>AIX, *BSD etc etc.

Kaminsky's Law of Laziness:  If you can't do it yourself, let somebody else
do it for you.

As far as I know, Samba doesn't automatically restart its daemons if
smb.conf changes.  Maybe it should.  That way, somebody could hack together
a perl(or a gawk) script to automatically update based on their platform,
and their script wouldn't have to deal with force-restarting Samba.

Andrew--when are standard, non-expansion includes loaded?  Obviously include
= smb.conf.%L has to load after the machine name is derived, but would
smb.conf.2 be loaded before the original connection?  Just trying to see
which files would have to be "watched" for modifications.

>Samba isn't just for Linux :)

Preach on, brother!

More information about the samba-technical mailing list