[Samba] ubuntu doesn't daemonize smbd
Chris Smith
smb_77 at chrissmith.org
Wed Jan 12 14:59:38 MST 2011
On Wed, Jan 12, 2011 at 4:20 PM, William E Jojo <w.jojo at hvcc.edu> wrote:
> It's similar to the way you can use startsrc or stopsrc on AIX.
>
> -F
> If specified, this parameter causes the main smbd process to not
> daemonize, i.e. double-fork and disassociate with the terminal.
> Child processes are still created as normal to service each
> connection request, but the main process does not exit. This
> operation mode is suitable for running smbd under process
> supervisors such as supervise and svscan from Daniel J. Bernstein´s
> daemontools package, or the AIX process monitor.
I've seen the man page :) AFAIK, running it as a daemon is preferable,
and I've always run it that way. If you had read further up the man
page you would have found:
"Operating the server as a daemon is the recommended way of running
smbd for servers that provide more than casual use file and print
services. This switch is assumed if smbd is executed on the command
line of a shell."
>> On the plus side, I am thankful that I have continued to avoid Ubuntu
>> as a candidate in any critical server role.
>
> Really, why? Is it unstable for you in some way? Just curious as I've not had any issues thus far and Canonical support is very responsive.
The problem with needed to restart nmbd manually (or via an additional
script) that I alluded is one reason. Choosing to not run smbd as a
daemon seems to be mistake in one way or another - you can set daemon
or inetd mode in /etc/default/samba but the smbd.conf upstart script
is hardcoded to run "smbd -F" and just as oddly the nmbd.conf script
is hardcoded to run "nmbd -D", both ignoring the setting in
/etc/default/samba.
And I have seen reported instances of Samba issues on Ubuntu being
resolved by avoiding the distro packages and compiling from source.
More information about the samba
mailing list