Samba - nmbd stops after boot

Help with issues regarding installation of Debian

Samba - nmbd stops after boot

Postby JPA » 2009-03-27 20:27

Hi all,

Problem - the nmbd daemon stops running after booting the computer!

To start Samba services automatically, I ran -
# update-rc.d samba defaults
Adding system startup for /etc/init.d/samba ...
/etc/rc0.d/K20samba -> ../init.d/samba
/etc/rc1.d/K20samba -> ../init.d/samba
/etc/rc6.d/K20samba -> ../init.d/samba
/etc/rc2.d/S20samba -> ../init.d/samba
/etc/rc3.d/S20samba -> ../init.d/samba
/etc/rc4.d/S20samba -> ../init.d/samba
/etc/rc5.d/S20samba -> ../init.d/samba

At boot, I see a message that says -
Starting Samba daemons: nmbd smbd

I login, open Root Terminal, and see -
# ps -ef | grep mbd
root 2517 1 0 12:47 ? 00:00:00 /usr/sbin/smbd -D
root 2553 2517 0 12:47 ? 00:00:00 /usr/sbin/smbd -D
root 3026 3022 0 12:49 pts/1 00:00:00 grep mbd

nmbd is not running!

I manually start Samba -
# /etc/init.d/samba start
Starting Samba daemons: nmbd smbd.

# ps -ef | grep mbd
root 2517 1 0 12:47 ? 00:00:00 /usr/sbin/smbd -D
root 2553 2517 0 12:47 ? 00:00:00 /usr/sbin/smbd -D
root 3062 1 0 12:56 ? 00:00:00 /usr/sbin/nmbd -D
root 3070 3022 0 12:57 pts/1 00:00:00 grep mbd

Now, from the Win box I can login and access files.

Running Lenny 5.0.0
# /usr/sbin/smbd -V
Version 3.2.5
# /usr/sbin/nmbd -V
Version 3.2.5

How do I make sure that nmbd starts and keeps running?

John
User avatar
JPA
 
Posts: 10
Joined: 2008-03-15 22:44
Location: San Diego, CA

Re: Samba - nmbd stops after boot

Postby cajasal » 2009-08-07 20:05

I have the same problem and I can't find how to fix it. Did you figure out how to fix the problem?
cajasal
 
Posts: 4
Joined: 2009-08-07 19:59

Re: Samba - nmbd stops after boot

Postby JPA » 2009-08-07 20:11

Hi cajasal,

No, I didn't. I just deal with it whenever I reboot.

Anyone have any suggestions???

John
User avatar
JPA
 
Posts: 10
Joined: 2008-03-15 22:44
Location: San Diego, CA

Re: Samba - nmbd stops after boot

Postby cajasal » 2009-08-07 20:23

did you check your logs and you have any error? I don't see any in mine!!
cajasal
 
Posts: 4
Joined: 2009-08-07 19:59

Re: Samba - nmbd stops after boot

Postby cajasal » 2009-08-10 13:59

found the solution try this:

First remove all this startup symbolic links
update-rc.d -f samba remove

then recreate symbolic links but before winbind at position 20, so just insted of start samba at 20 start samba at 19 or do ( ls -l /etc/rc2.d ) to see where winbind start.
update-rc.d samba start 19 2 3 4 5 . stop 01 0 1 6 .

Reboot and check to see if works with: ps aux | grep smbd and ps aux | grep nmbd

It works for me
cajasal
 
Posts: 4
Joined: 2009-08-07 19:59

Re: Samba - nmbd stops after boot

Postby JPA » 2009-08-13 19:35

Hi cajasal,

I tried the update-rc.d command for samba, first with remove, and then start 19 as you suggested. No luck.
The system is not running winbind.

After putting back things as before (update-rc.d samba defaults), here's what I have:
# ls -l /etc/rc2.d
total 4
-rw-r--r-- 1 root root 556 2008-08-12 07:09 README
lrwxrwxrwx 1 root root 21 2009-03-24 23:19 S05loadcpufreq -> ../init.d/loadcpufreq
lrwxrwxrwx 1 root root 17 2009-03-24 22:48 S10rsyslog -> ../init.d/rsyslog
lrwxrwxrwx 1 root root 15 2009-03-24 22:49 S12acpid -> ../init.d/acpid
lrwxrwxrwx 1 root root 14 2009-03-24 23:19 S12dbus -> ../init.d/dbus
lrwxrwxrwx 1 root root 22 2009-03-24 23:19 S14avahi-daemon -> ../init.d/avahi-daemon
lrwxrwxrwx 1 root root 22 2009-03-24 23:19 S19cpufrequtils -> ../init.d/cpufrequtils
lrwxrwxrwx 1 root root 14 2009-03-24 23:24 S20cups -> ../init.d/cups
lrwxrwxrwx 1 root root 15 2009-03-24 23:18 S20exim4 -> ../init.d/exim4
lrwxrwxrwx 1 root root 20 2009-03-24 23:24 S20kerneloops -> ../init.d/kerneloops
lrwxrwxrwx 1 root root 20 2009-03-24 23:18 S20nfs-common -> ../init.d/nfs-common
lrwxrwxrwx 1 root root 23 2009-03-24 23:18 S20openbsd-inetd -> ../init.d/openbsd-inetd
lrwxrwxrwx 1 root root 15 2009-08-13 12:22 S20samba -> ../init.d/samba
lrwxrwxrwx 1 root root 16 2009-03-24 23:20 S24dhcdbd -> ../init.d/dhcdbd
lrwxrwxrwx 1 root root 13 2009-03-24 23:22 S24hal -> ../init.d/hal
lrwxrwxrwx 1 root root 25 2009-03-24 23:24 S26network-manager -> ../init.d/network-manager
lrwxrwxrwx 1 root root 36 2009-03-24 23:24 S26network-manager-dispatcher -> ../init.d/network-manager-dispatcher
lrwxrwxrwx 1 root root 13 2009-03-24 23:21 S30gdm -> ../init.d/gdm
lrwxrwxrwx 1 root root 31 2009-03-24 23:21 S30system-tools-backends -> ../init.d/system-tools-backends
lrwxrwxrwx 1 root root 17 2009-03-24 23:19 S89anacron -> ../init.d/anacron
lrwxrwxrwx 1 root root 13 2009-03-24 23:18 S89atd -> ../init.d/atd
lrwxrwxrwx 1 root root 14 2009-03-24 22:48 S89cron -> ../init.d/cron
lrwxrwxrwx 1 root root 18 2009-03-24 22:48 S99rc.local -> ../init.d/rc.local
lrwxrwxrwx 1 root root 19 2009-03-24 22:48 S99rmnologin -> ../init.d/rmnologin
lrwxrwxrwx 1 root root 23 2009-03-24 22:48 S99stop-bootlogd -> ../init.d/stop-bootlogd

What is winbind? Do I need it?
User avatar
JPA
 
Posts: 10
Joined: 2008-03-15 22:44
Location: San Diego, CA

Re: Samba - nmbd stops after boot

Postby cajasal » 2009-08-14 12:25

Hi John,

search a bout winbind on yahoo or look this http://www.centos.org/docs/4/4.5/Refere ... bindd.html . I believe is one of those services that help samba negotiate with windows box. It is strange why it can run when you type the command "samba start" or smb -d start, probably you have winbind installed but is not running at start up. Look for it in your services at the X window and make sure it will start as a service at start up. Or just install winbind and make it run in position 20 after samba daemons start. It works in 3 debian 5.0 machines I just fix them. I reboot them couple of time to see if all daemons are up and it woks fine and fast.
cajasal
 
Posts: 4
Joined: 2009-08-07 19:59

Re: Samba - nmbd stops after boot

Postby okos » 2009-10-30 17:32

I found a simple workaround that worked for me.

I just added this to /etc/rc.local
/etc/init.d/samba restart

I rebooted and the my shared files were available at startup.
okos
 
Posts: 6
Joined: 2007-05-30 03:39

Re: Samba - nmbd stops after boot

Postby JPA » 2009-11-03 22:34

Hi okos,

That sure does the trick!

Domo Arigato & Muchas Gracias!
John
User avatar
JPA
 
Posts: 10
Joined: 2008-03-15 22:44
Location: San Diego, CA

Re: Samba - nmbd stops after boot

Postby THvier » 2010-02-01 03:50

Based on okos' solution of (re)starting samba after most services are already up and running, I did a

"mv /etc/rc2.d/S20samba /etc/rc2.d/S60samba"

, placing samba start behind netatalk.

It works for me so far, but having read reports of nmbd only occasionally not runnig after startup on some systems, I don't dare calling this THE solution.

Cheers, THvier
THvier
 
Posts: 1
Joined: 2010-02-01 03:24


Return to Installation

Who is online

Users browsing this forum: No registered users and 6 guests

fashionable