[Samba] Must restart nmbd to connect

Gilles gilles.ganault at free.fr
Mon Aug 2 13:16:09 MDT 2010


On Mon, 02 Aug 2010 11:49:37 +0200, Gilles <gilles.ganault at free.fr>
wrote:
>Does someone understand what's going on?

Thanks for the help through e-mail.

For those interested, the bug might be due to a race condition between
the smbd and nmbd init scripts:

But adding the mkdir line, and even changing the symlinks in
/etc/rc2.d/ to make sure that smbd is started before nmbd (S20 and
S80, respectively)... 1) makes no difference, and 2) prevented nmbd
from booting:

=================
# cat /etc/init/nmbd.conf

pre-start script
        #Added to solve bug where nmbd wouldn't start after reboot
        mkdir /var/run/samba

        NMBD_DISABLED=`testparm -s --parameter-name='disable netbios'
2>/dev/null`

        [ "x$NMBD_DISABLED" = xYes ] && { stop; exit 0; }

        install -o root -g root -m 755 -d /var/run/samba
end script
=================
# ll /etc/rc2.d/
lrwxrwxrwx   1 root root   14 2010-08-02 10:20 S20nmbd ->
../init.d/nmbd*
lrwxrwxrwx   1 root root   14 2010-08-02 00:26 S20smbd ->
../init.d/smbd*
=================
rm S20nmbd
ln -s ../init.d/nmbd S80nmbd
=================
rebooted : ps aux : Still NOK
=================
apt-get update
apt-get upgrade
dpkg -l | grep -i samba
3.4.7~dfsg-1ubuntu3
=================
less /var/log/samba/log.smbd
less /var/log/samba/log.nmbd
less /var/log/messages
Nothing
=================
# /etc/init.d/nmbd restart
Rather than invoking init scripts through /etc/init.d, use the
service(8)
utility, e.g. service nmbd restart
[...]
start: Job failed to start
=================
# restart nmbd
restart: Unknown instance:
=================
# start nmbd
start: Job failed to start
=================
# /etc/init.d/nmbd start
Rather than invoking init scripts through /etc/init.d, use the
service(8)
utility, e.g. service nmbd start
[...]
start: Job failed to start
=================
# joe /etc/init/nmbd.conf
Commented out line
=================
# /etc/init.d/nmbd start
Rather than invoking init scripts through /etc/init.d, use the
service(8)
utility, e.g. service nmbd start
[...]
nmbd start/running, process 5448
=================

I find it hard to believe that such an important package is broken.
Maybe it's another issue.

Thank you.



More information about the samba mailing list