DSM-G600, DNS-3xx and NSA-220 Hack Forum

Unfortunately no one can be told what fun_plug is - you have to see it for yourself.

You are not logged in.

Announcement

#1 2010-06-21 07:41:03

krackpot
Member
Registered: 2009-01-24
Posts: 44

Samba 3.4.6 quits unexpectedly

It seems /ffp/sbin/smbd appears to be quitting after a few minutes. I used SWAT to monitor the running processes, fired up SWAT, started smbd and nmbd. They both report running in SWAT and in "top". So no issues there. Windows connects to the shares flawlessly, no problems.

After a few minutes, SWAT will report smbd and nmbd as both "not running", and 'top' will not have any entries for /ffp/sbin/smbd -D.

This is really fustrating sad

Anyone else getting this problem?

EDIT:

Got some info from the level 2 logs (this is from smbd & nmbd start until it dies):

-----
rlimit_max: rlimit_max (1024) below minimum Windows limit (16384)
[2010/06/20 20:46:21,  2] param/loadparm.c:7743(do_section)
  Processing section "[web_page]"
[2010/06/20 20:46:21,  2] param/loadparm.c:7743(do_section)
  Processing section "[printers]"
[2010/06/20 20:46:21,  1] param/loadparm.c:6774(service_ok)
  NOTE: Service printers is flagged unavailable.
[2010/06/20 20:46:21,  2] param/loadparm.c:7743(do_section)
  Processing section "[Volume_1-1]"
[2010/06/20 20:46:21,  2] param/loadparm.c:7743(do_section)
  Processing section "[Volume_2]"
[2010/06/20 20:46:21,  2] param/loadparm.c:7743(do_section)
  Processing section "[Volume_2-1]"
[2010/06/20 20:46:21,  2] param/loadparm.c:7743(do_section)
  Processing section "[Volume_1]"
[2010/06/20 20:46:21,  2] param/loadparm.c:7743(do_section)
  Processing section "[web_page]"
[2010/06/20 20:46:21,  2] lib/interface.c:340(add_interface)
  added interface egiga0 ip=10.0.0.4 bcast=10.255.255.255 netmask=255.0.0.0
[2010/06/20 20:46:21,  2] smbd/server.c:676(smbd_parent_loop)
  waiting for connections
[2010/06/20 20:48:58,  2] smbd/sesssetup.c:1360(setup_new_vc_session)
  setup_new_vc_session: New VC == 0, if NT4.x compatible we would close all old resources.
[2010/06/20 20:48:58,  1] smbd/service.c:1063(make_connection_snum)
  10.0.0.25 (10.0.0.25) connect to service Volume_1 initially as user nobody (uid=501, gid=501) (pid 13526)
[2010/06/20 20:48:58,  1] smbd/service.c:1063(make_connection_snum)
  10.0.0.25 (10.0.0.25) connect to service Volume_2 initially as user nobody (uid=501, gid=501) (pid 13526)
[2010/06/20 20:48:58,  2] smbd/sesssetup.c:1360(setup_new_vc_session)
  setup_new_vc_session: New VC == 0, if NT4.x compatible we would close all old resources.
[2010/06/20 20:48:58,  1] smbd/service.c:1063(make_connection_snum)
  10.0.0.25 (10.0.0.25) connect to service Volume_1 initially as user nobody (uid=501, gid=501) (pid 13526)
[2010/06/20 20:48:58,  1] smbd/service.c:1063(make_connection_snum)
  10.0.0.25 (10.0.0.25) connect to service Volume_2 initially as user nobody (uid=501, gid=501) (pid 13526)
[2010/06/20 20:48:58,  2] smbd/sesssetup.c:1360(setup_new_vc_session)
  setup_new_vc_session: New VC == 0, if NT4.x compatible we would close all old resources.
[2010/06/20 20:48:58,  2] auth/auth.c:310(check_ntlm_password)
  check_ntlm_password:  authentication for user [writer] -> [writer] -> [writer] succeeded
[2010/06/20 20:48:58,  1] smbd/service.c:1063(make_connection_snum)
  10.0.0.25 (10.0.0.25) connect to service Volume_2-1 initially as user writer (uid=503, gid=703) (pid 13527)
[2010/06/20 20:48:58,  2] auth/auth.c:310(check_ntlm_password)
  check_ntlm_password:  authentication for user [writer] -> [writer] -> [writer] succeeded
[2010/06/20 20:48:58,  1] smbd/service.c:1063(make_connection_snum)
  10.0.0.25 (10.0.0.25) connect to service Volume_1-1 initially as user writer (uid=503, gid=703) (pid 13527)
-----

So that means it only lasts about 3 mins sad

Last edited by krackpot (2010-06-21 07:57:45)


DNS-323 (B1) on Alt-F 0.1B7
2x2TB WD20EARS

Offline

 

#2 2010-06-22 08:09:01

krackpot
Member
Registered: 2009-01-24
Posts: 44

Re: Samba 3.4.6 quits unexpectedly

I needed to crank the log file to level 5 to get an error that actually was useful.

-----
[2010/06/21 21:01:50,  3] smbd/server.c:845(exit_server_common)
  Server exit (failed to receive smb request)
-----

That is the last line before smbd quits. HELP!


DNS-323 (B1) on Alt-F 0.1B7
2x2TB WD20EARS

Offline

 

#3 2010-06-22 09:56:21

fonz
Member / Developer
From: Berlin
Registered: 2007-02-06
Posts: 1716
Website

Re: Samba 3.4.6 quits unexpectedly

Offline

 

#4 2010-06-22 13:52:10

krackpot
Member
Registered: 2009-01-24
Posts: 44

Re: Samba 3.4.6 quits unexpectedly

I'm not that great with the compiling/debugging errors etc. I tried googling, but not sure what people are saying. They do not seem to have a fix for this.

That is the exact version I'm using on ffp. I downloaded it from your ffp website. I only used the samba-3.4.6-1.tgz, not the build files. Do I need to do that? Think it's worth a shot "reinstalling"? How would I go about doing that?


DNS-323 (B1) on Alt-F 0.1B7
2x2TB WD20EARS

Offline

 

#5 2010-06-28 10:56:06

krackpot
Member
Registered: 2009-01-24
Posts: 44

Re: Samba 3.4.6 quits unexpectedly

Strange, I'm not sure what I did that caused it to work now. I think I just resaved the config file from SWAT, and after a few reboots it started working.


DNS-323 (B1) on Alt-F 0.1B7
2x2TB WD20EARS

Offline

 

#6 2010-06-30 23:50:07

krackpot
Member
Registered: 2009-01-24
Posts: 44

Re: Samba 3.4.6 quits unexpectedly

I found out the problem:
/usr/sbin/samba/smbd seems to restart and kick back in after a few minutes following a "smb stop" command. It stops the /ffp/sbin/smbd which is the 3.4.6 version.

A temp fix:
1) Stop the old samba:
smb stop
2) cd into /usr/sbin and rename the samba folder:
mv samba samba-old
3) Start the new 3.4.6 samba:
sh /ffp/start/samba.sh start

This will have to be done every time a reboot is done on the device (Somehow it resets. Maybe because it's on the rootfs?)



I need to find a way to permanently disable the old samba.
Tried Mektub's method from http://dns323.kood.org/forum/viewtopic.php?id=5441 but it doesn't kill it completely.

Code:

On /ffp/etc/fun_plug.local, at the end I inserted:

Code:
echo "* Stopping Samba Services"

/bin/kill `pidof nmbd`
/bin/kill `pidof smbd`
sleep 3
echo 'swat 901/tcp' >>/etc/services

EDIT: The issue persists. /ffp/sbin/samba/smbd still dies after a while. At least it's not getting replaced by the old one. sad

Last edited by krackpot (2010-07-01 00:13:47)


DNS-323 (B1) on Alt-F 0.1B7
2x2TB WD20EARS

Offline

 

#7 2010-12-18 05:58:24

diagpope
New member
Registered: 2009-12-19
Posts: 3

Re: Samba 3.4.6 quits unexpectedly

I had the same problem and for now am trying this in the /ffsp/start/samba.sh

#!/ffp/bin/sh

# PROVIDE: samba
# REQUIRE: LOGIN

. /ffp/etc/ffp.subr

name="samba"
start_cmd="samba_start"
stop_cmd="samba_stop"
status_cmd="samba_status"

smbd_flags="-D --debuglevel=3 --configfile=/ffp/etc/samba/smb.conf"
nmbd_flags="-D"

required_files="/ffp/etc/samba/smb.conf"

samba_start()
{
    proc_start /ffp/sbin/smbd
    proc_start /ffp/sbin/nmbd
}

samba_stop()
{
    proc_stop smbd
    proc_stop nmbd
    killall -9 smbd
    killall -9 nmbd
    # prepare a new samba dir with all files
    rm -fr /ffp/var/samba
    mkdir -p /ffp/var/samba
    list="smbd nmbd"
    for file in $list; do
        ln -fs /ffp/sbin/$file /ffp/var/samba
    done
    list="smbcacls samba smbget smbpasswd smbcquotas smbtree smbclient smbstatus smbspool smbtar smbcontrol"
    for file in $list; do
        ln -fs /ffp/bin/$file /ffp/var/samba
    done
    if [ ! -d /usr/sbin/samba.bak ]; then
    mv -f /usr/sbin/samba /usr/sbin/samba.bak
    fi
    if [ ! -e /usr/sbin/samba ]; then
    ln -fs /ffp/var/samba /usr/sbin/samba
    fi
}

samba_status()
{
    proc_status smbd
    proc_status nmbd
}

run_rc_command "$1"

1) I do not see the /usr/sbin/samba/smbd replacing my /ffp/sbin/smbd anymore
2) If it would it should start the ffp version from the symbolically linked samba dir from /ffp/var/samba instead

Offline

 

#8 2013-01-21 21:32:56

mzypt
Member
Registered: 2008-12-14
Posts: 19

Re: Samba 3.4.6 quits unexpectedly

This is already an old thread but I just faced the same problem described here. I have struggled with this problem already quite a long time but now I finally decided to actually do something about it.

The problem is
/usr/sbin/samba/smbd -D keeps crashing once and a while. (why, I don't know) But when it crashes even "smb restart" doesn't help, only restart.

So I tried a workaround with installing ffp samba-3.4.6-1.

First I put "smb stop" to startup script to stop the original samba server and then "/ffp/start/samba.sh start" to start the ffp samba.
For a while it looked ok, but then the  /usr/sbin/samba/smbd kicked in exactly like krackpot explained before.



I tried also the script introduced by "diagpope". It looked to work just fine. But this morning I checked  and "/ffp/sbin/samba/smbd" was again replaced by "/usr/sbin/samba/smbd"

How can I destroy/disable "/usr/sbin/samba/smbd" for good? Smbd started in system_init script during boot up. But the file is "read only" so can't edit that either.

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2010 PunBB