Author Topic: Hide NAS-SMB share? [SOLVED]  (Read 2614 times)

Offline richardsim7

  • Member
  • **
  • Posts: 17
Hide NAS-SMB share? [SOLVED]
« on: May 29, 2011, 01:27:18 PM »
Hi there, I'm running unRAID on an HP MicroServer. It's been great (albeit a little slow at times).

I only have AFP enabled however on my Network I see this:


How can I stop the NAS from advertising SMB??

Cheers

EDIT: Solved!!

Try adding these lines to your go file:
Code: [Select]
avahi-daemon -k
rm /etc/avahi/services/samba.service
avahi-daemon -D

« Last Edit: June 07, 2011, 04:43:46 AM by richardsim7 »

Offline defected07

  • Hero Member
  • *****
  • Posts: 532
Re: Hide NAS-SMB share?
« Reply #1 on: May 29, 2011, 02:26:52 PM »
Yeah I've been trying to figure this out as well--I have the same issue, though I haven't disabled SMB entirely.

Tried to google hiding Shared networks from Finder's sidebar, but didn't have much luck.

Maybe it's a configuration under UnRAID to displays this...

Offline Joe L.

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 17803
Re: Hide NAS-SMB share?
« Reply #2 on: May 29, 2011, 02:27:51 PM »
Yeah I've been trying to figure this out as well--I have the same issue, though I haven't disabled SMB entirely.

Tried to google hiding Shared networks from Finder's sidebar, but didn't have much luck.

Maybe it's a configuration under UnRAID to displays this...
in unRAID, hide the user-shares and disks shares.

Offline richardsim7

  • Member
  • **
  • Posts: 17
Re: Hide NAS-SMB share?
« Reply #3 on: May 29, 2011, 02:41:48 PM »
in unRAID, hide the user-shares and disks shares.

Wouldn't that hide everything? I just want to hide SMB

Here's the only setting I could find


Offline defected07

  • Hero Member
  • *****
  • Posts: 532
Re: Hide NAS-SMB share?
« Reply #4 on: May 29, 2011, 02:51:45 PM »
Yeah I've been trying to figure this out as well--I have the same issue, though I haven't disabled SMB entirely.

Tried to google hiding Shared networks from Finder's sidebar, but didn't have much luck.

Maybe it's a configuration under UnRAID to displays this...
in unRAID, hide the user-shares and disks shares.

It's not the individual shares, but the "Tower" share.  On a mac, it comes up under Network Shares as "Tower" and "Tower-SMB".  It's a Mac-only thing--the Tower is for AFP, and the SMB for Samba.  Even with Samba disabled, it wil show both of them.

Offline dgaschk

  • Hero Member
  • *****
  • Posts: 5710
Re: Hide NAS-SMB share?
« Reply #5 on: May 29, 2011, 06:47:01 PM »
Try adding these lines to your go file:
Code: [Select]
avahi-daemon -k
rm /etc/avahi/services/samba.service
avahi-daemon -D
Include your VERSION and SYSTEM LOG for support issues
Unofficial Documentation  Check Disk Filesystems  The Analysis of Drive Issues  Console Commands 

Revert to stock system:                    Stock go file:
1. Rename the /boot(flash)/config/plugins directory.
2. Rename the /boot(flash)/plugins directory.
3. Rename boot(flash)/extra/.
4. Use the stock go file (boot(flash)/config/go).
                    #!/bin/bash
# Start the Management Utility
/usr/local/sbin/emhttp &

Offline defected07

  • Hero Member
  • *****
  • Posts: 532
Re: Hide NAS-SMB share?
« Reply #6 on: May 31, 2011, 02:53:40 PM »
I think you may be correct.  Here's the output of my samba.service file:

Code: [Select]

<?xml version="1.0" standalone='no'?><!--*-nxml-*-->
<!DOCTYPE service-group SYSTEM "avahi-service.dtd">

<service-group>
    <name replace-wildcards="yes">%h-SMB</name>
    <service>
        <type>_smb._tcp</type>
        <port>139</port>
    </service>
    <service>
         <type>_device-info._tcp</type>
         <port>0</port>
         <txt-record>model=Xserve</txt-record>
    </service>
</service-group>

Maybe there's a way to just not announce it for a certain IP address? Or it probably would work to remove this--will try and let you know, thanks!

Edit: That appears to work, thanks. I forgot Avahi is really just for broadcasting to OS X, correct? It's similar to Bonjour? So anything that has Bonjour it also may be broadcast to?
« Last Edit: May 31, 2011, 03:36:55 PM by defected07 »

Offline ilovegoodnugz

  • Full Member
  • ***
  • Posts: 155
Re: Hide NAS-SMB share?
« Reply #7 on: May 31, 2011, 04:21:16 PM »
You know I could swear I had it working as Tower-SMB without turning afp at one point, but I can never seem to replicate it again. The tower icon turns into a indows style monitor when it is connected that way.

Offline richardsim7

  • Member
  • **
  • Posts: 17
Re: Hide NAS-SMB share?
« Reply #8 on: May 31, 2011, 04:34:43 PM »

Edit: That appears to work, thanks. I forgot Avahi is really just for broadcasting to OS X, correct? It's similar to Bonjour? So anything that has Bonjour it also may be broadcast to?

Yeah that would make sense, it didn't show up before I fixed Bonjour on my network (stupid BT HomeHub)

I'll give the solution a go tomorrow and let you know how it turns out

Offline SidebandSamurai

  • Full Member
  • ***
  • Posts: 131
Re: Hide NAS-SMB share?
« Reply #9 on: May 31, 2011, 11:24:29 PM »
you might want to try this.

But first the disclaimer:   I am not sure if this would be fully support in UnRaid, in other words i don't know what affect these settings might have on other features or modules you have loaded in your particular Unraid server.  Remember if you break it you bought it!

start a terminal session
enter:  cd /etc/samba <enter>
enter:  vi smb-shares.conf
Locate:  the share you would like to "Hide"

for example I would like to hide the "USB-2" share

this is what the stanza looks like in smb-shares.conf

Code: [Select]
[USB]
        path = /mnt/user/USB
        read only = No
        comment = Attached USB Drive
[USB-2]
        path = /mnt/user/USB-2
        read only = No
        comment = Attached USB drive

in the USB-2 stanza under the "read only = NO" enter the following

Code: [Select]
        path = /mnt/user/USB-2
        read only = No
        browseable = No
        comment = Attached USB drive

then save your file ":wq"
Now restart samba

In this case I have not figured out how to do that with out restarting the whole server.  So that's what I would recommend is to restart the whole server.

You can do this for all the shares and see if that solves your problem.

Good Luck

Sideband Samurai

Offline defected07

  • Hero Member
  • *****
  • Posts: 532
Re: Hide NAS-SMB share?
« Reply #10 on: June 01, 2011, 06:06:35 AM »
We're not trying to hide the shares, but the "Tower-SMB" announcement that shows up on OS X in the Shared sidebar in Finder.  I believe the fix dgaschk shared worked for me--without limiting Samba connection via Windows.  I connect via AFP on my Mac, so I only need to see the "Tower" announcement (as depicted in OP's screen shot).

Thanks for your info though, I'm sure it'd be helpful in a different application :)

Offline muzo178

  • Member
  • **
  • Posts: 12
    • www.muzob.com
Re: Hide NAS-SMB share?
« Reply #11 on: June 05, 2011, 04:13:42 PM »
Try adding these lines to your go file:
Code: [Select]
avahi-daemon -k
rm /etc/avahi/services/samba.service
avahi-daemon -D


i can also confirm that this works beautifully.

Offline defected07

  • Hero Member
  • *****
  • Posts: 532
Re: Hide NAS-SMB share?
« Reply #12 on: June 05, 2011, 07:03:45 PM »
Yeah, it was working fine.  Then I went into Windows through VMWare Fusion, and couldn't write to my shares.  It was able to connect through Samba, but only read. I changed two things, unfortunately, and it works; I rebooted the server so that the samba.service would re-load, and set my "samba" username to read/write through AFP as well.  Also, rebooting may have fixed the issue, but I've found I need to give the same users read/write access in AFP, as well as Samba, for R/W to work in AFP. Anyone else experience that?

Offline richardsim7

  • Member
  • **
  • Posts: 17
Re: Hide NAS-SMB share?
« Reply #13 on: June 07, 2011, 03:54:33 AM »
Try adding these lines to your go file:
Code: [Select]
avahi-daemon -k
rm /etc/avahi/services/samba.service
avahi-daemon -D


Perfect!! :)
Now how do I mark this thread as solved?

Offline dgaschk

  • Hero Member
  • *****
  • Posts: 5710
Re: Hide NAS-SMB share?
« Reply #14 on: June 07, 2011, 04:34:32 AM »
Try adding these lines to your go file:
Code: [Select]
avahi-daemon -k
rm /etc/avahi/services/samba.service
avahi-daemon -D


Perfect!! :)
Now how do I mark this thread as solved?

Edit the first post.
Include your VERSION and SYSTEM LOG for support issues
Unofficial Documentation  Check Disk Filesystems  The Analysis of Drive Issues  Console Commands 

Revert to stock system:                    Stock go file:
1. Rename the /boot(flash)/config/plugins directory.
2. Rename the /boot(flash)/plugins directory.
3. Rename boot(flash)/extra/.
4. Use the stock go file (boot(flash)/config/go).
                    #!/bin/bash
# Start the Management Utility
/usr/local/sbin/emhttp &