• December 06, 2019, 07:02:07 AM
  • 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.

Pages: [1] 2

Author Topic: Disable SMB for Macs only  (Read 11930 times)

hardworking

  • Guest
Disable SMB for Macs only
« on: November 29, 2012, 04:23:57 AM »

Hi All,

So I just bought and installed this 320L and want to know if there is a way I can get rid of Samba (SMB Sharing).  I run only Macs here and SMB is SO slow compared to AFP.

If I connect manually I get AFP, but if I use the link that appears in Finder it defaults to SMB  :(

Thanks
John
Logged

priitv8

  • Level 3 Member
  • ***
  • Posts: 252
Re: Disable SMB for Macs only
« Reply #1 on: November 29, 2012, 01:52:59 PM »

Hi,

There's probably a way to kill the smbd daemon (not via Web-GUI though), but I found it to be sufficient to stop the service advertising via Avahi (Bonjour on Linux) to be sufficient.
Indeed, I replaced it with AFP service advertisement to make connecting from Finder more convenient.
Logged

hardworking

  • Guest
Re: Disable SMB for Macs only
« Reply #2 on: November 29, 2012, 02:30:52 PM »

Hi,

There's probably a way to kill the smbd daemon (not via Web-GUI though), but I found it to be sufficient to stop the service advertising via Avahi (Bonjour on Linux) to be sufficient.
Indeed, I replaced it with AFP service advertisement to make connecting from Finder more convenient.

Hi,

Thanks for the reply.  Can you please tell me how you did that?  I would be happy if the macs just don't see SMB and only see AFP, but I can't see how to do that.

Cheers
John
Logged

priitv8

  • Level 3 Member
  • ***
  • Posts: 252
Re: Disable SMB for Macs only
« Reply #3 on: November 29, 2012, 10:15:57 PM »

You will need to FunPlug the device to get access to it's command prompt and Linux filesystem.
As soon as you've installed Midnight Commander, you'll be working in a Norton Commander-like environment.
To achieve the desired result, I deleted samba.service and added proper afp.service to the proper folder
Code: [Select]
/etc/avahi/services
Logged

hardworking

  • Guest
Re: Disable SMB for Macs only
« Reply #4 on: November 29, 2012, 11:54:37 PM »

Hmm... Ok.  Some research is needed.  :)

So in doing that, does the system still run the same, with the same GUI and functions etc?
Logged

priitv8

  • Level 3 Member
  • ***
  • Posts: 252
Re: Disable SMB for Macs only
« Reply #5 on: November 30, 2012, 05:34:16 AM »

So in doing that, does the system still run the same, with the same GUI and functions etc?
It will run with extended functionality as a matter of fact. Standard UI & apps remain unchanged.
For research, I suggest you start here:
http://nas-tweaks.net/371/hdd-installation-of-the-fun_plug-0-7-on-nas-devices/
Logged

hardworking

  • Guest
Re: Disable SMB for Macs only
« Reply #6 on: November 30, 2012, 02:24:03 PM »

Thanks man!! That's excellent!

Now I have it running, I need to see if I can install things like SabNZBD and Sickbeard.  :)

Cheers
-J
Logged

priitv8

  • Level 3 Member
  • ***
  • Posts: 252
Re: Disable SMB for Macs only
« Reply #7 on: December 01, 2012, 12:35:42 AM »

To make it even more Mac-like, you could also play with the _device-info._tcp key in the Avahi service definition. Mine looks like this and it is btw absolutely universal, because %h will advertise your set hostname:
Code: [Select]
<?xml version="1.0" standalone='no'?><!--*-nxml-*-->
<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
<service-group>
<name replace-wildcards="yes">%h</name>
<service>
<type>_afpovertcp._tcp</type>
<port>548</port>
</service>
<service>
<type>_device-info._tcp</type>
<port>0</port>
<txt-record>model=Xserve</txt-record>
</service>
</service-group>
Now it looks like this in my Finder:
Logged

hardworking

  • Guest
Re: Disable SMB for Macs only
« Reply #8 on: December 01, 2012, 12:48:43 AM »

Well, I have Sickbeard and Sab running.  I followed a tutorial online, although there was a fair bit of tweaking that I needed to do to get it to work, but its working now. :)

Now I just need to fix the whole AFP thing.  I am still not quite clear on what I need to do.
Logged

priitv8

  • Level 3 Member
  • ***
  • Posts: 252
Re: Disable SMB for Macs only
« Reply #9 on: December 01, 2012, 02:01:04 AM »

Now I just need to fix the whole AFP thing.  I am still not quite clear on what I need to do.
Well, to have AFP advertised via Avahi/Bonjour just copy the afp.service I listed above to /etc/avahi/services (it has to be called smth.services). That's it for making AFP connection visible for Mac.
To make this excercise survive reboot, you would need to find where /etc/avahi/services is stored on FLASH device and copy the file there (should be quite along the lines of store-password.sh from nas-tweaks), but I haven't bothered with this yet. I keep my NAS on 24/7.
Obviously, you need to enable afpd daemon under Application Management > AFP Service to serve AFP in the first place.
« Last Edit: December 01, 2012, 02:09:27 AM by priitv8 »
Logged

hardworking

  • Guest
Re: Disable SMB for Macs only
« Reply #10 on: December 01, 2012, 02:45:40 AM »

Quote
Well, to have AFP advertised via Avahi/Bonjour just copy the afp.service I listed above to /etc/avahi/services (it has to be called smth.services).

Sorry mate - I am not al that versed with Linux, and I am not sure I understand the above.  One second you call it afp.service, but then tell me it should be smth.services, so I am a bit puzzled.  :(

Sorry man - I am just not that skilled in Linux yet.

Can you please explain a bit better - Sorry.  :(
Logged

priitv8

  • Level 3 Member
  • ***
  • Posts: 252
Re: Disable SMB for Macs only
« Reply #11 on: December 01, 2012, 11:25:28 AM »

Sure.
1) you create the AFP service description XML file for Avahi (or copy mine from above)
2) you name the file afp.service. I think Avahi only cares about the file extension, which shall be .service, the name part needs to be unique within target folder
3) you copy your afp.service (self-descriptive names are easier) to /etc/avahi/services on your NAS. No need to reboot, Avahi picks it up on the fly
4) you delete samba.service file from the same directory so Bonjour will not confuse Finder with offering SMB. You have no official way to stop SMB service on NAS. I'm sure this can be taken care of via checking the startup scripts of NAS-Linux.

PS you might feel better after installing Midnight Commander (how-to on nas-tweaks site), then you can navigate around the filesystem as in good 'ol Norton Commander.
« Last Edit: December 01, 2012, 11:27:45 AM by priitv8 »
Logged

hardworking

  • Guest
Re: Disable SMB for Macs only
« Reply #12 on: December 01, 2012, 01:42:35 PM »

Thanks again!

Not sure if it's just me but I can't find any reference to Midnight Commander on the tweaks site??  ???

Also.. Are you talking about the FFP file system?  I can get to that with SSH, but I don't see the actual NAS OS?
Logged

priitv8

  • Level 3 Member
  • ***
  • Posts: 252
Re: Disable SMB for Macs only
« Reply #13 on: December 01, 2012, 02:49:59 PM »

I'm sorry, it was on another site, check the section titled INSTALL MIDNIGHT COMMANDER.
FFP7 makes it easy thanks to the slacker package installer.
http://bernaerts.dyndns.org/appliance/231-dns323-ffp7-install-funplug7
The filesystem is a single one, if you ssh in as root, you will land in your home directory.
Change dir to root and you see the whole filesystem
Code: [Select]
cd /Then there's one more site worth having look at, although the DNS-320L is still too new to be found there:
http://dns323.kood.org/start?idx=howto
« Last Edit: December 01, 2012, 02:55:03 PM by priitv8 »
Logged

hardworking

  • Guest
Re: Disable SMB for Macs only
« Reply #14 on: December 01, 2012, 02:55:55 PM »

Ahh!  Ok.  Thanks.

I think I might have the wrong version on FFP maybe as I don't have an Avahi folder!  :(

AND... further to this, to get SickBeard and SabNZBD running I had to install Debian Squeeze.  So I don't think I can do this anyway.  :(

I searched everywhere and couldn't seem to find a way to run Sab and Sickbeard without installing Squeeze.  Unless you know - I could't find it anywhere.

Squeeze was pretty easy... but I just hate the Samba crap - not part of Squeeze though, it's obviously part of the original OS.  But I can't see any of those files.

When I navigate to /mnt/HD/HD_a2  I only see the FFP dir and the shares I have created, but no OEM OS files.  :(

I am SSHing into Squeeze now though, so maybe that is the problem.

Logged
Pages: [1] 2