Date: Sun, 7 Jan 2001 10:05:45 -0500 From: Lanny Baron <lnb@panda.FreeBSDsystems.COM> To: David Banning <david@banning.com>, David Banning <david@www3.pacific-pages.com> Cc: David <davidd@datasphereweb.com>, questions@FreeBSD.ORG Subject: Re: no samba with inetd start Message-ID: <01010710054500.55136@panda.FreeBSDsystems.COM> In-Reply-To: <20010105160111.B56360@www3.pacific-pages.com> References: <20010102195957.A4104@www3.pacific-pages.com> <20010103173655.A59500@panda.FreeBSDsystems.COM> <20010105160111.B56360@www3.pacific-pages.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Hello David, If you intend to run samba as a daemon, do _not_ use inetd. I suggest you read the docs. Since I downloaded samba from my mirror, and installed it to /usr/local I have a samba-2.0.7 in which all the documents are. Here is part of a doc from /usr/local/samba-2.0.7/docs/textdocs/ : STEP 5. Starting the smbd and nmbd. You must choose to start smbd and nmbd either as daemons or from inetd. Don't try to do both! Either you can put them in inetd.conf and have them started on demand by inetd, or you can start them as daemons either from the command line or in /etc/rc.local. See the man pages for details on the command line options. Take particular care to read the bit about what user you need to be in order to start Samba. In many cases you must be root. The main advantage of starting smbd and nmbd as a daemon is that they will respond slightly more quickly to an initial connection request. This is, however, unlilkely to be a problem. Regards, Lanny On Friday 05 January 2001 16:01, David Banning wrote: > On Wed, Jan 03, 2001 at 05:36:55PM -0500, Lanny Baron wrote: > Thanks Lanny. That works, I know. > But I'm wondering then, how do the entries in inetd.conf > come in to play? > > The entries; > > netbios-ssn stream tcp nowait root /usr/local/sbin/sbbd smbd > netbios-ns dgram udp wait root /usr/local/sbin/nmbd nmbd > > are shown both in "The Complete FreeBSD" Handbook and > in > http://www.freebsddiary.org/samba.html > > Any ideas? > > > Hi, > > Ultimately, you want to start 'mbd' at boot time. Put the following in > > /usr/local/etc/rc.d as samba.sh: #!/bin/sh > > smbspool=/var/spool/samba > > pidfiledir=/var/run > > smbd=/usr/local/samba/bin/smbd > > nmbd=/usr/local/samba/bin/nmbd > > > > # start > > if [ "x$1" = "x" -o "x$1" = "xstart" ]; then > > if [ -f $smbd ]; then > > if [ -d $smbspool ]; then > > rm -f $smbspool/* > > fi > > echo -n ' Samba' > > $smbd -D > > $nmbd -D > > fi > > > > # stop > > elif [ "x$1" = "xstop" ]; then > > kill `cat $pidfiledir/smbd.pid` > > kill `cat $pidfiledir/nmbd.pid` > > fi > > > > To be clear, if you copy the above it should be in a file with the path > > being: /usr/local/etc/rc.d/samba.sh > > > > make sure to chmod 755 samba.sh > > > > Hope that helps you out. > > > > Lanny Baron > > > > On Wed, Jan 03, 2001 at 01:33:18AM -0500, David Banning wrote: > > > On Tue, Jan 02, 2001 at 05:06:57PM -0800, David wrote: > > > > On Tue, Jan 02, 2001 at 07:59:58PM -0500, David Banning wrote: > > > > > I have recently installed samba. I seems to run fine > > > > > when I run from the shell; > > > > > > > > > > $ smbd -D > > > > > $ nmbd -D > > > > > > > > > > but when I run it by commenting out the entries in inetd.conf; > > > > > > > > > > netbios-ssn stream tcp nowait root /usr/local/sbin/sbbd smbd > > > > > netbios-ns dgram udp wait root /usr/local/sbin/nmbd nmbd > > > > > > > > > > it won't run; > > > > > > > > > > any idea why? > > > > > > > > I can't give you a reason why other then say "it won't work that > > > > way?" > > > > > > The only reason I had the belief that it would work that way was this > > > tutorial, which, other than this problem I brought forward, seemed to > > > work great for me. The tutorial shows both ways of running samba, but > > > kind of suggests that the *right* way is through inetd. > > > > > > http://www.freebsddiary.org/samba.html > > > > > > Anyway I will run it from rc.d as you suggest. Thanks. > > > > > > > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > > > with "unsubscribe freebsd-questions" in the body of the message > > > > -- > > ------------------------------------- > > Lanny Baron > > Proud to be 100% FreeBSD > > FreeBSD Systems, Inc; Freedom Technologies Corp. > > http://www.FreeBSDsystems.COM > > 1.877.963.1900 -- ------------------------------------- Lanny Baron Proud to be 100% FreeBSD FreeBSD Systems, Inc; Freedom Technologies Corp. http://www.FreeBSDsystems.COM 1.877.963.1900 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?01010710054500.55136>