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

Andrew Tridgell tridge at
Mon Jan 25 00:21:12 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 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.

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.

Samba isn't just for Linux :)

More information about the samba-technical mailing list