• May 16, 2024, 12:50:28 PM
  • Welcome, Guest
Please login or register.

Login with username, password and session length
Advanced search  

News:

This Forum Beta is ONLY for registered owners of D-Link products in the USA for which we have created boards at this time.

Author Topic: "Native" Samba keeps trying to kill my FFP Samba  (Read 5817 times)

palswim

  • Level 1 Member
  • *
  • Posts: 20
    • Palswim.net
"Native" Samba keeps trying to kill my FFP Samba
« 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.
Logged

gunrunnerjohn

  • Level 11 Member
  • *
  • Posts: 2717
Re: "Native" Samba keeps trying to kill my FFP Samba
« Reply #1 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.
Logged
Microsoft MVP - Windows Desktop Experience
Remember: Data you don't have two copies of is data you don't care about!
PS: RAID of any level is NOT a second copy.

palswim

  • Level 1 Member
  • *
  • Posts: 20
    • Palswim.net
Re: "Native" Samba keeps trying to kill my FFP Samba
« Reply #2 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.
Logged

mig

  • Level 3 Member
  • ***
  • Posts: 217
Re: "Native" Samba keeps trying to kill my FFP Samba
« Reply #3 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?
Logged

gunrunnerjohn

  • Level 11 Member
  • *
  • Posts: 2717
Re: "Native" Samba keeps trying to kill my FFP Samba
« Reply #4 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. :)
Logged
Microsoft MVP - Windows Desktop Experience
Remember: Data you don't have two copies of is data you don't care about!
PS: RAID of any level is NOT a second copy.

palswim

  • Level 1 Member
  • *
  • Posts: 20
    • Palswim.net
Re: "Native" Samba keeps trying to kill my FFP Samba
« Reply #5 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.
Logged