D-Link Forums

The Graveyard - Products No Longer Supported => D-Link Storage => DNS-321 => Topic started by: palswim on September 17, 2010, 12:00:28 PM

Title: "Native" Samba keeps trying to kill my FFP Samba
Post by: palswim on September 17, 2010, 12:00:28 PM
I installed FFP Samba because I wanted a bit more control than the device's Samba gave me.  All worked well for quite a while.

Now, for some reason, it appears that the device no longer appreciates me trying to infringe on its territory and somehow manages to kill FFP Samba and re-start its own version shortly after I try to start the FFP Samba.

I have the following in my /ffp/start/samba.sh:
Code: [Select]
#!/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"

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

smbd_flags="-D -s $required_files"
nmbd_flags="-D -s $required_files"


samba_start()
{
        cp /ffp/etc/samba/smb.conf /etc/samba/
        proc_start /ffp/sbin/smbd # /usr/sbin/samba/smbd
        proc_start /ffp/sbin/nmbd # /usr/sbin/samba/nmbd
}

samba_stop()
{
#       smb stop # I thought this would help, but it didn't
        proc_stop smbd
        proc_stop nmbd
}

samba_status()
{
        proc_status smbd
        proc_status nmbd
}

run_rc_command "$1"

It seems that as soon as I try to access one of my Samba shares (via one of my Windows machines), I can see it read the folder list and try to display the files, but then the old Samba takes over and I no longer see any files and if I try to access any of the shares again, I start getting "\\NAS\share is not accessible" errors (since the old Samba doesn't seem to like the Guest account I've configured).

I can verify that the old Samba is running instead of the FFP Samba with the top command.
Title: Re: "Native" Samba keeps trying to kill my FFP Samba
Post by: gunrunnerjohn on September 17, 2010, 01:07:35 PM
It's not nice to fool with mother nature! :D

I wonder if an on-the-fly replacement of the SAMBA module itself would help?

I've replaced the smb.conf file with a script and it sticks, don't know why that would fail.
Title: Re: "Native" Samba keeps trying to kill my FFP Samba
Post by: palswim on September 17, 2010, 01:57:04 PM
I've replaced the smb.conf file with a script and it sticks, don't know why that would fail.

This part works.  I overwrite the smb.conf file and it sticks.  But, with my smb.conf file, the native Samba doesn't like some of my settings.  So, this is why I want to run the FFP Samba.
Title: Re: "Native" Samba keeps trying to kill my FFP Samba
Post by: mig on September 17, 2010, 04:30:51 PM
This part works.  I overwrite the smb.conf file and it sticks.  But, with my smb.conf file, the native Samba doesn't like some of my settings.  So, this is why I want to run the FFP Samba.

Maybe you could try to overwrite the native Samba exe with the FFP Samba exe in your startup script?
Title: Re: "Native" Samba keeps trying to kill my FFP Samba
Post by: gunrunnerjohn on September 18, 2010, 09:58:54 AM
Maybe you could try to overwrite the native Samba exe with the FFP Samba exe in your startup script?
See my previous post, that's what I suggested. :)
Title: Re: "Native" Samba keeps trying to kill my FFP Samba
Post by: palswim on September 18, 2010, 07:27:19 PM
I wonder if an on-the-fly replacement of the SAMBA module itself would help?

Tried that one, but even when overwriting the link in /usr/bin/, it didn't seem to work.

I rebooted and for now, that has solved the problem.  I only expected Windows to get all wonky after long uptimes.  I guess this box does, too.