richardsim7 Posted May 29, 2011 Share Posted May 29, 2011 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: avahi-daemon -k rm /etc/avahi/services/samba.service avahi-daemon -D Quote Link to comment
defected07 Posted May 29, 2011 Share Posted May 29, 2011 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... Quote Link to comment
Joe L. Posted May 29, 2011 Share Posted May 29, 2011 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. Quote Link to comment
richardsim7 Posted May 29, 2011 Author Share Posted May 29, 2011 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 Quote Link to comment
defected07 Posted May 29, 2011 Share Posted May 29, 2011 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. Quote Link to comment
dgaschk Posted May 30, 2011 Share Posted May 30, 2011 Try adding these lines to your go file: avahi-daemon -k rm /etc/avahi/services/samba.service avahi-daemon -D Quote Link to comment
defected07 Posted May 31, 2011 Share Posted May 31, 2011 I think you may be correct. Here's the output of my samba.service file: <?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? Quote Link to comment
ilovegoodnugz Posted May 31, 2011 Share Posted May 31, 2011 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. Quote Link to comment
richardsim7 Posted May 31, 2011 Author Share Posted May 31, 2011 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 Quote Link to comment
SidebandSamurai Posted June 1, 2011 Share Posted June 1, 2011 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 [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 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 Quote Link to comment
defected07 Posted June 1, 2011 Share Posted June 1, 2011 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 Quote Link to comment
muzo178 Posted June 5, 2011 Share Posted June 5, 2011 Try adding these lines to your go file: avahi-daemon -k rm /etc/avahi/services/samba.service avahi-daemon -D i can also confirm that this works beautifully. Quote Link to comment
defected07 Posted June 6, 2011 Share Posted June 6, 2011 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? Quote Link to comment
richardsim7 Posted June 7, 2011 Author Share Posted June 7, 2011 Try adding these lines to your go file: avahi-daemon -k rm /etc/avahi/services/samba.service avahi-daemon -D Perfect!! Now how do I mark this thread as solved? Quote Link to comment
dgaschk Posted June 7, 2011 Share Posted June 7, 2011 Try adding these lines to your go file: 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. Quote Link to comment
richardsim7 Posted June 7, 2011 Author Share Posted June 7, 2011 Try adding these lines to your go file: 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. Done, thanks again Quote Link to comment
muzo178 Posted July 14, 2011 Share Posted July 14, 2011 Upgraded to 5.0-beta9 and in order to disable the SMB share on this version, you need to make a change to the go file: #disable avahi smb broadcast avahi-daemon -k rm /etc/avahi/services/smb.service avahi-daemon -D the file that the go script is removing used to be called samba.service. now that the 'netatalk' subsystem is upgraded from version 2.0.5 to 2.1.5 in this new beta9; it is called smb.service Quote Link to comment
defected07 Posted July 14, 2011 Share Posted July 14, 2011 Nice one, thanks for keeping us updated muzo. Quote Link to comment
brent112 Posted September 4, 2011 Share Posted September 4, 2011 any ideas on why this would not work when put in my go file? I can run it manual but when i add the script to the go file it is never executed. Any ideas? Go script root@Orion:/boot# cat /boot/config/go #!/bin/bash # Start the Management Utility /usr/local/sbin/emhttp & # Wait 1 minute and then start Plex echo "/boot/custom/plex/init.sh >/dev/null 2>&1" | at now + 1 minute # Start unRAID Notification System unraid_notify start # Run additional scripts in /boot/custom/scripts /boot/custom/scripts/SMB_Disable #/boot/cache_dirs -w -i "Videos" -i "Music" cd /boot/packages && find . -name '*.auto_install' -type f -print | sort | xargs -n1 sh -c SMB_Disable script root@Orion:/boot# cat /boot/custom/scripts/SMB_Disable #!/bin/bash # Disable avahi smb broadcast avahi-daemon -k rm /etc/avahi/services/smb.service avahi-daemon -D root@Orion:/boot# Quote Link to comment
defected07 Posted September 4, 2011 Share Posted September 4, 2011 Try placing it at the end of your go script. Maybe the avahi files haven't been moved to that location yet? Not sure -- but it's worth trying at the end if you havne't already. Quote Link to comment
seim Posted September 22, 2012 Share Posted September 22, 2012 Found this thread via Google. Your instructions there aren't working or work just until the next time you disable and re-enable Samba, or the whole array - at this events the Avahi service config files are getting rewritten from their templates which are "smb.service-", so the original name with a hypen at the end. The easiest way and that's how I solved my desire is to empty the template file on boot. Everytime you change something and at the inital start of the array, an empty file is used for the samba broadcast - thus there is no broadcast.. You can do this with one simple line of code added to your "go" file: #Disable Avahi smb broadcast echo "" > /etc/avahi/services/smb.service- Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.