samba and inetd problems

Richard Sharpe sharpe at ns.aus.com
Fri May 19 15:59:46 GMT 2000


At 10:58 PM 5/19/00 +1000, Ron Alexander wrote:
>Can someone PLEASE tell me if using inetd is the recommended way or not?

This has already been answered ...

>According to all the books I have, it is recommended.

Well, I have had other people express confusion over this. The
documentation in the docs directory, which has not been updated for a long
time in some cases recommends using inetd, and the material in SAMS TYS
Samba in 24 hours probably talked about both methods without recommending
either. I did not write it, so I can't say. 

Whew, just checked what we wrote in Special Edition, Using Samba. We tell
you how to start it at boot time as daemons, from the command line, and
from inetd, and we include a disclaimer about inetd.

Guess that is another reason to get Special Edition, Using Samba, when it
is released, that is.

>I don't understand how it could work however, since inetd would hear the
>connection requests on port 139 before the smb daemon would. As a result,
>you would get more smb daemons starting and failing becuse they could not
>lock the smbd.pid file.

Well, as others have said, you can't run them from inetd and as daemons.
Typically what happens is that inetd starts before the run control scripts
try to start smbd and smbd dies with an error saying address in use. This
is because inetd has port 139 already bound, so smbd cannot get it.

You can start nmbd from inetd, but there are some problems ...

>Ron
>
>-----Original Message-----
>From: samba-technical at samba.org [mailto:samba-technical at samba.org]On
>Behalf Of Peter Samuelson
>Sent: May 19, 2000 1:35 AM
>To: Multiple recipients of list SAMBA-TECHNICAL
>Subject: Re: samba and inetd problems
>
>
>
>[Ron Alexander <rcalex at home.com>]
>> If I put the entries in the inetd.conf file, I get some strange behavior.
>
>As I recall, this isn't recommended, especially for nmbd.  The whole
>NetBIOS suite of protocols confuses me at the best of times, but I
>believe you can get major browsing problems if your nmbd isn't
>persistent.  smbd is a little more up in the air, I admit.
>
>As the old joke goes, I'd recommend "So don't do that."  Just run smbd
>and nmbd with "-D" at boot.
>
>> I see 3 listeners to port 139. 2 of them are wildcards and one is the
>> specific interface I have in the smb.conf, but localhost is missing.
>
>>From what I understand of the Unix sockets paradigm, you can't get the
>functionality of "interfaces=" if you're running from inetd, because
>you "interfaces=" specifies what ports you bind to, but if you're using
>inetd, you aren't binding ports at all.  (inetd is binding them.)
>
>> tcp        0      0  *:139               *:*                LISTEN
>> tcp        0      0  134.111.220.160:139 *:*                LISTEN
>> tcp        0      0  *:139               *:*                LISTEN
>
>Don' know nothin' about how *that* got in there.  It is interesting, no
>question about it.
>
>Peter
>
>

Regards
-------
Richard Sharpe, sharpe at ns.aus.com
Samba (Team member, www.samba.org), Ethereal (Team member, www.zing.org)
Co-author, SAMS Teach Yourself Samba in 24 Hours
Author: First Australian 5-day, intensive, hands-on Linux SysAdmin course
Author: First Australian 2-day, intensive, hands-on Samba course



More information about the samba-technical mailing list